Ok danke aber jetzt wollte ich noch wissen wie ich das am besten mache dass neue DT Fahrzeug System im Script einzubauen ?
Weil ich noch das alte drine habe zwar mit Live_Viewer aber nicht das ganz neue und wollte das gerne so haben das 3d nummern schild beim kauf erstellt wird könnte man das machen ?
Beiträge von |!!|_TOR_|!!|
-
-
Ich habe mich mal aufen Server eingelogt also Register funktioniert und man wird auch gespawn aber der Account wird nicht gespeichert.
Mein "mysql.inc"
/**
* SA:MP MySQL v2.1 Functions
* (c) Copyright 2011, StrickenKid
*
**/#if defined __mysql_included
#endinput
#endif#define __mysql_included
#pragma library mysql// plugin error id's
#define P_ERROR_NONE 0
#define P_ERROR_INCPARAMCNT 1
#define P_ERROR_INCVALUE 2
#define P_ERROR_MAXCONN 3
#define P_ERROR_DBNOCONN 4
#define P_ERROR_NORES 5
#define P_ERROR_RES 6
#define P_ERROR_NOFIELD 7
#define P_ERROR_NOFIELDDATA 8
#define P_ERROR_NOROWDATA 9
#define P_ERROR_CANTALLOC 10
#define P_ERROR_NOCALLBACK 11
#define P_ERROR_NOQUERY 12// mysql headers defines
#define REFRESH_GRANT 1
#define REFRESH_LOG 2
#define REFRESH_TABLES 4
#define REFRESH_HOSTS 8
#define REFRESH_STATUS 16
#define REFRESH_THREADS 32
#define REFRESH_SLAVE 64
#define REFRESH_MASTER 128// mysql error id's
#define CR_ERROR_FIRST 2000
#define CR_UNKNOWN_ERROR 2000
#define CR_SOCKET_CREATE_ERROR 2001
#define CR_CONNECTION_ERROR 2002
#define CR_CONN_HOST_ERROR 2003
#define CR_IPSOCK_ERROR 2004
#define CR_UNKNOWN_HOST 2005
#define CR_SERVER_GONE_ERROR 2006
#define CR_VERSION_ERROR 2007
#define CR_OUT_OF_MEMORY 2008
#define CR_WRONG_HOST_INFO 2009
#define CR_LOCALHOST_CONNECTION 2010
#define CR_TCP_CONNECTION 2011
#define CR_SERVER_HANDSHAKE_ERR 2012
#define CR_SERVER_LOST 2013
#define CR_COMMANDS_OUT_OF_SYNC 2014
#define CR_NAMEDPIPE_CONNECTION 2015
#define CR_NAMEDPIPEWAIT_ERROR 2016
#define CR_NAMEDPIPEOPEN_ERROR 2017
#define CR_NAMEDPIPESETSTATE_ERROR 2018
#define CR_CANT_READ_CHARSET 2019
#define CR_NET_PACKET_TOO_LARGE 2020
#define CR_EMBEDDED_CONNECTION 2021
#define CR_PROBE_SLAVE_STATUS 2022
#define CR_PROBE_SLAVE_HOSTS 2023
#define CR_PROBE_SLAVE_CONNECT 2024
#define CR_PROBE_MASTER_CONNECT 2025
#define CR_SSL_CONNECTION_ERROR 2026
#define CR_MALFORMED_PACKET 2027
#define CR_WRONG_LICENSE 2028
#define CR_NULL_POINTER 2029
#define CR_NO_PREPARE_STMT 2030
#define CR_PARAMS_NOT_BOUND 2031
#define CR_DATA_TRUNCATED 2032
#define CR_NO_PARAMETERS_EXISTS 2033
#define CR_INVALID_PARAMETER_NO 2034
#define CR_INVALID_BUFFER_USE 2035
#define CR_UNSUPPORTED_PARAM_TYPE 2036
#define CR_SHARED_MEMORY_CONNECTION 2037
#define CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR 2038
#define CR_SHARED_MEMORY_CONNECT_ANSWER_ERROR 2039
#define CR_SHARED_MEMORY_CONNECT_FILE_MAP_ERROR 2040
#define CR_SHARED_MEMORY_CONNECT_MAP_ERROR 2041
#define CR_SHARED_MEMORY_FILE_MAP_ERROR 2042
#define CR_SHARED_MEMORY_MAP_ERROR 2043
#define CR_SHARED_MEMORY_EVENT_ERROR 2044
#define CR_SHARED_MEMORY_CONNECT_ABANDONED_ERROR 2045
#define CR_SHARED_MEMORY_CONNECT_SET_ERROR 2046
#define CR_CONN_UNKNOW_PROTOCOL 2047
#define CR_INVALID_CONN_HANDLE 2048
#define CR_SECURE_AUTH 2049
#define CR_FETCH_CANCELED 2050
#define CR_NO_DATA 2051
#define CR_NO_STMT_METADATA 2052
#define CR_NO_RESULT_SET 2053
#define CR_NOT_IMPLEMENTED 2054
#define CR_SERVER_LOST_EXTENDED 2055
#define CR_STMT_CLOSED 2056
#define CR_NEW_STMT_METADATA 2057
#define CR_ERROR_LAST 2057// logging types
#define INVALID_MYSQL_ID (-1)
#define LOG_OFF (0)
#define LOG_ALL (1)
#define LOG_ONLY_ERRORS (2)// function defines
#define mysql_reload(%1) mysql_refresh(REFRESH_GRANT, %1)
// plugin callbacks
forward OnMysqlQueryArray(resultid, extravars[], MySQL:handle);
forward OnMysqlQuery(resultid, spareid, MySQL:handle);
forward OnMysqlError(error[], errorid, MySQL:handle);// plugin natives
native MySQL:mysql_init(logtype = LOG_ONLY_ERRORS, printerrors = 1);
native mysql_connect(const host[], const user[], const pass[], const db[], MySQL:handle = (MySQL:0), auto_reconnect = 0);
native mysql_close(MySQL:handle = (MySQL:0));
native mysql_refresh(options, MySQL:handle = (MySQL:0));
native mysql_select_db(const db[], MySQL:handle = (MySQL:0));
native mysql_query(const query[], resultid = (-1), spareid = (0), MySQL:handle = (MySQL:0));
native mysql_query_array(const query[], resultid = (-1), {Float,_}:extravars[], MySQL:handle = (MySQL:0));
native mysql_store_result(MySQL:handle = (MySQL:0));
native mysql_free_result(MySQL:handle = (MySQL:0));
native mysql_result_stored(MySQL:handle = (MySQL:0));
native mysql_fetch_field(const fieldname[], dest[], MySQL:handle = (MySQL:0));
native mysql_fetch_field_num(fieldnum, dest[], MySQL:handle = (MySQL:0));
native mysql_fetch_row(dest[], const splitter[] = "|", MySQL:handle = (MySQL:0));
native mysql_fetch_row_data(MySQL:handle = (MySQL:0));
native mysql_real_escape_string(const string[], dest[], MySQL:handle = (MySQL:0));
native mysql_num_rows(MySQL:handle = (MySQL:0));
native mysql_num_fields(MySQL:handle = (MySQL:0));
native mysql_affected_rows(MySQL:handle = (MySQL:0));
native mysql_insert_id(MySQL:handle = (MySQL:0));
native mysql_ping(MySQL:handle = (MySQL:0));
native mysql_error(dest[], MySQL:handle = (MySQL:0));
native mysql_errno(MySQL:handle = (MySQL:0));
native mysql_warning_count(MySQL:handle = (MySQL:0));
native mysql_info(dest[], MySQL:handle = (MySQL:0));
native mysql_stat(dest[], MySQL:handle = (MySQL:0));
native mysql_get_server_info(dest[], MySQL:handle = (MySQL:0));
native mysql_get_host_info(dest[], MySQL:handle = (MySQL:0));
native mysql_data_seek(rownum, MySQL:handle = (MySQL:0));
native mysql_set_character_set(const csname[], MySQL:handle = (MySQL:0));
native mysql_get_character_set(csname[], MySQL:handle = (MySQL:0));
native mysql_fetch_int(MySQL:handle = (MySQL:0));
native Float:mysql_fetch_float(MySQL:handle = (MySQL:0));
native mysql_fetch_string(dest[], MySQL:handle = (MySQL:0));#if !defined split
// split function - thanks to Blacklite
stock split(const strsrc[], strdest[][], delimiter = '|')
{
new i, li, aNum, len, srclen = strlen(strsrc);
while(i <= srclen)
{
if (strsrc[i] == delimiter || i == srclen)
{
len = strmid(strdest[aNum], strsrc, li, i, 128);
strdest[aNum][len] = 0;
li = i + 1;
aNum++;
}
i++;
}
}
#endifUnd mein plugins sind die hier:
HIER KLICKEN -
function ConnectServer() {
print(" Connecting to the database please wait.");
mysql_connect(SERVER_HOST, SERVER_USER, SERVER_DB, SERVER_PASSWORD);
mysql_debug(1);
if(mysql_ping() == -1) {
print(" You're not connected!");
}
else {
print(" You're connected!");
}
SMFConnection = mysql_connect(SMF_HOST, SMF_USER, SMF_DB, SMF_PASSWORD);
if(mysql_ping(SMFConnection) != 1) {
print("Unable to connect");
}
else {
print("Connected to the CSMF");
}
}OngameModeInit:
public OnGameModeInit() {
mysql_debug(1);
CreateServerTextDraws();
ConnectServer();
for(new i = 0; i < MAX_VEHICLES; i ++ ) {
strmid(CarData[i][Owner], "None", 0, strlen("None"), 255);
CarData[i][Engine] = false;
LightsToggled[i] = false;
CarData[i][Rented] = false;
}
for(new i = 0; i < TOTAL_CELLS; i ++ ) {
CellData[i][Open] = false;
}
for(new i = 0; i < TOTAL_GANGZONES; i ++ ) {
GangZoneStructure[i] = -1;
}
for(new i = 0; i < sizeof(dharvcps); i ++ ) {
CreateObject( 776, dharvcps[i][0], dharvcps[i][1], dharvcps[i][2]-15, 0, 0, 96 );
}
LoadVehicles();
LoadMapicons();
LoadOOCRooms();
LoadGasStations();
LoadBiz();
LoadHouses();
LoadBuildings();
LoadFactions();
LoadDorms();
LoadNewsPapers();
LoadGangZones();
TimerData[CheatTimer] = SetTimer("CheatCheck", ANTICHEAT_TIMER, 1);
TimerData[MapIconStream] = SetTimer("StreamerUpdate", FAST_TIMER, 1);
TimerData[FuelTimer] = SetTimer("UpdateFuel", UPDATE_FUEL_TIMER, 1);
TimerData[ClassTimer] = SetTimer("StartClass", START_CLASS_TIMER, 1);
TimerData[PayDayTimer] = SetTimer("Payday", PAYDAY_TIMER, 1);
Create3DTextLabel("[Bank]", COLOR_DO,593.5185,-1250.9753,18.2514, 200.0, 0, 1);
Create3DTextLabel("[Advertisement]", COLOR_DO,1310.2059,-1366.7977,13.5066, 200.0, 0, 1);
Create3DTextLabel("* There's a unknown man, sitting on the ground *", COLOR_DO,1410.0319,-1303.5917,9.3380, 200.0, 0, 1);
//Create3DTextLabel("[Mechanic]\nJob - /applyjob", COLOR_DO,-62.9871,-1121.3834,1.1680, 200.0, 0, 1);
SetGameModeText("QRP - Dev 0.5");
EnableStuntBonusForAll(0);
DisableInteriorEnterExits();
AllowInteriorWeapons(1);
ShowPlayerMarkers(0);
// Pool
CreateStreamedObject(974, 1259.8481445313, -769.83941650391, 1085.7926025391, 0.000000, 0.000000, 90.007049560547); //
return 1;
}function SaveAccount(playerid) {
GetPlayerPos(playerid, AccountData[playerid][Spawn][0],AccountData[playerid][Spawn][1],AccountData[playerid][Spawn][2]);
GetPlayerFacingAngle(playerid, AccountData[playerid][Spawn][3]);
AccountData[playerid][InteriorSpawn] = GetPlayerInterior(playerid);
AccountData[playerid][WorldSpawn] = GetPlayerVirtualWorld(playerid);
format(string,sizeof(string), "UPDATE Accounts SET AdminLevel=%i,Money=%i,Bank=%i,Faction=%i,Rank=%i,HouseKey=%i,BizKey=%i,Skin=%i,Spawn1='%f',Spawn2='%f',Spawn3='%f',Spawn4='%f',Spawn5=%i,Reg=%i,Sex=%i,Wallet=%i,Renting=%i,Products=%i,PhoneNumber=%i,Minutes=%i,Spawn6=%i,Arrested=%i,Prisoned=%i,Jailed=%i,JailTime=%i, \
Cell=%i,Towe=%i,License=%i,Linked=%i,ForumName='%s',ForumPassword='%s',wLicense=%i,Job=%i,Donator=%i,CarParts=%i,PlayingTime=%i,FightingStyle=%i WHERE Name = '%s'",
AccountData[playerid][AdminLevel],GetPlayerCash(playerid),AccountData[playerid][Bank],
AccountData[playerid][Faction],AccountData[playerid][Rank],AccountData[playerid][HouseKey],
AccountData[playerid][BizKey],GetPlayerSkin(playerid),AccountData[playerid][Spawn][0],AccountData[playerid][Spawn][1],AccountData[playerid][Spawn][2],AccountData[playerid][Spawn][3],
AccountData[playerid][InteriorSpawn],AccountData[playerid][Reg],AccountData[playerid][Sex],GetPlayerWalletCash(playerid),AccountData[playerid][Renting],AccountData[playerid][Products],
AccountData[playerid][PhoneNumber],AccountData[playerid][Minutes],AccountData[playerid][WorldSpawn],AccountData[playerid][Arrested],AccountData[playerid][Prisoned],AccountData[playerid][Jailed],
AccountData[playerid][JailTime],AccountData[playerid][Cell],AccountData[playerid][Towe],AccountData[playerid][License], AccountData[playerid][Linked], AccountData[playerid][ForumName],
AccountData[playerid][ForumPassword],AccountData[playerid][wLicense],AccountData[playerid][pJob], AccountData[playerid][Donator], AccountData[playerid][CarParts], AccountData[playerid][PlayingTime],
AccountData[playerid][FightingStyle],GetUserName(playerid));
mysql_query(string, MYSQL_SAVE_USERS);
format(string,sizeof(string), "UPDATE Accounts SET Materials=%i WHERE Name = '%s'",
AccountData[playerid][Materials],GetUserName(playerid));
mysql_query(string, MYSQL_SAVE_USERS);
format(string, sizeof(string), "UPDATE enrolled SET Classes=%i WHERE Name = '%s'", AccountData[playerid][Classes],
GetUserName(playerid));
mysql_query(string);
format(string, sizeof(string), "UPDATE scholarships SET Psychology=%i,Criminal_Justice=%i,Medicine=%i WHERE Name = '%s'", UniversityData[playerid][Psychology], UniversityData[playerid][Criminal_Justice],
UniversityData[playerid][Medicine],GetUserName(playerid));
mysql_query(string);
format(string, sizeof(string), "UPDATE drugs SET Cocaine=%d,Crack=%d,Heroin=%d,Hydrocodone=%d,\
Inhalants=%d,LSD=%d,Marijuana=%d,MDMA=%d,Methamphetamine=%d,Anabolic_Steroids=%d,Needles=%d,Blunts=%d WHERE Name = '%s'",
PlayerDrugData[playerid][Cocaine],PlayerDrugData[playerid][Crack],PlayerDrugData[playerid][Heroin],PlayerDrugData[playerid][Hydrocodone],
PlayerDrugData[playerid][Inhalants],PlayerDrugData[playerid][LSD],PlayerDrugData[playerid][Marijuana],PlayerDrugData[playerid][MDMA],
PlayerDrugData[playerid][Methamphetamine],PlayerDrugData[playerid][Anabolic_Steroids],PlayerDrugData[playerid][Needles],PlayerDrugData[playerid][Blunts],GetUserName(playerid));
mysql_query(string);
format(string, sizeof(string), "UPDATE Settings SET Turfs=%i,SAN=%i,Phone=%i,Room=%i WHERE Name = '%s'", PlayerSettingsData[playerid][TurfTog], PlayerSettingsData[playerid][SANTog],
PlayerSettingsData[playerid][PhoneTog], PlayerSettingsData[playerid][RoomTog],GetUserName(playerid));
mysql_query(string);
SavePlayerWeapons(playerid);
SavePlayerWeaponsAmmo(playerid);
}Und mal meine mysql_log.txt
SQL
Alles anzeigen[12:43:29] [12:43:29] --------------------------- [12:43:29] MySQL Debugging activated (02/01/11) [12:43:29] --------------------------- [12:43:29] [12:44:16] >> mysql_query( Connection handle: 1 ) [12:44:16] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:16] >> mysql_store_result( Connection handle: 1 ) [12:44:16] >> mysql_store_result() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:16] >> mysql_num_rows( Connection handle: 1 ) [12:44:16] >> mysql_num_rows() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:16] >> mysql_num_rows( Connection handle: 1 ) [12:44:16] >> mysql_num_rows() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:16] >> mysql_free_result( Connection handle: 1 ) [12:44:16] >> mysql_free_result() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:23] >> mysql_real_escape_string( Connection handle: 1 ) [12:44:23] >> mysql_real_escape_string() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:23] >> mysql_query( Connection handle: 1 ) [12:44:23] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:23] >> mysql_query( Connection handle: 1 ) [12:44:23] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:23] >> mysql_query( Connection handle: 1 ) [12:44:23] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:23] >> mysql_query( Connection handle: 1 ) [12:44:23] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:23] >> mysql_query( Connection handle: 1 ) [12:44:23] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:23] >> mysql_query( Connection handle: 1 ) [12:44:23] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:23] >> mysql_query( Connection handle: 1 ) [12:44:23] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:23] >> mysql_query( Connection handle: 1 ) [12:44:23] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:23] >> mysql_query( Connection handle: 1 ) [12:44:23] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:23] >> mysql_query( Connection handle: 1 ) [12:44:23] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:23] >> mysql_query( Connection handle: 1 ) [12:44:23] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:23] >> mysql_query( Connection handle: 1 ) [12:44:23] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:23] >> mysql_query( Connection handle: 1 ) [12:44:23] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:23] >> mysql_query( Connection handle: 1 ) [12:44:23] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:23] >> mysql_query( Connection handle: 1 ) [12:44:23] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:23] >> mysql_query( Connection handle: 1 ) [12:44:23] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:23] >> mysql_store_result( Connection handle: 1 ) [12:44:23] >> mysql_store_result() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:23] >> mysql_fetch_row_format( Connection handle: 1 ) [12:44:23] >> mysql_fetch_row_format() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:51] >> mysql_query( Connection handle: 1 ) [12:44:51] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:51] >> mysql_query( Connection handle: 1 ) [12:44:51] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:51] >> mysql_query( Connection handle: 1 ) [12:44:51] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:51] >> mysql_query( Connection handle: 1 ) [12:44:51] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:51] >> mysql_query( Connection handle: 1 ) [12:44:51] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:51] >> mysql_query( Connection handle: 1 ) [12:44:51] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:51] >> mysql_query( Connection handle: 1 ) [12:44:51] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:44:51] >> mysql_query( Connection handle: 1 ) [12:44:51] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:47:32] >> mysql_query( Connection handle: 1 ) [12:47:32] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:47:32] >> mysql_query( Connection handle: 1 ) [12:47:32] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:47:32] >> mysql_query( Connection handle: 1 ) [12:47:32] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:47:32] >> mysql_query( Connection handle: 1 ) [12:47:32] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:47:32] >> mysql_query( Connection handle: 1 ) [12:47:32] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:47:32] >> mysql_query( Connection handle: 1 ) [12:47:32] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:47:32] >> mysql_query( Connection handle: 1 ) [12:47:32] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0). [12:47:32] >> mysql_query( Connection handle: 1 ) [12:47:32] >> mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0).
-
Was soll ich den Posten wenn ich selber nicht weiss wieso das mit Mysql nicht funktioniert ?
Es sind mehrere hundert zeilen die mit Mysql verbunden sind. -
Script Mysql:
//=====================================[MySQL defines]=====================================
#define MYSQL_LOAD_VEHICLES 1
#define MYSQL_SAVE_VEHICLES 2
#define MYSQL_SAVE_USERS 3
#define MYSQL_LOAD_ICONS 4
#define MYSQL_LOAD_OOC_ROOMS 5
#define MYSQL_LOAD_GAS_STATIONS 6
#define MYSQL_LOAD_HOUSES 7
#define MYSQL_LOAD_BIZ 8
#define MYSQL_LOAD_BUILDINGS 9
#define MYSQL_LOAD_FACTIONS 10
#define MYSQL_LOAD_DORMS 11
#define MYSQL_LOAD_NEWSPAPERS 12
#define MYSQL_LOAD_GANEZONES 13Mein Mysql DB:
Edit: Mysql DB eingefügt
-
Also ich komme aufen Server bei Mode: Unknown
Und befehle gehen aufen Server aber die ganzen sachen sind nicht geladen vehicles icons etc. ?
Und in der mysql.log steht das drinZitat[11:40:11]
[11:40:11] ---------------------------
[11:40:11] MySQL Debugging activated (02/01/11)
[11:40:11] ---------------------------
[11:40:11]Und die DB Tabellen sind alle erstellt in der db.
Was ist der fehler wieso mysql nicht geht ? -
Jo ich verbinde mich mit der Db hier mal
Zitat#define SERVER_HOST "localhost"
#define SERVER_DB "server"
#define SERVER_USER "root"
#define SERVER_PASSWORD "tester2011"
Und ja ich habe SetGameModeText("Selfmade");Verstehe nicht welches genaue Pluging brauche ich für Mysql das oder ?
HIER KLICKEN -
Guten Morgen,
ich habe grade mein Server starten wollen aber irgend wie möchte der nicht das Script laden bei mir steht "Unknown" ?Hier mal Server Status:
ZitatHostName: [TEST-SERVER]by Tor
Address:
Players: 0 / 20
Ping: 14
Mode: Unknown
Map: San AndreasHier mal die server.log:
Zitat----------
Loaded log file: "server_log.txt".
----------SA-MP Dedicated Server
----------------------
v0.3a R8, (C)2005-2010 SA-MP Team[04:49:50] filterscripts = "" (string)
[04:49:50]
[04:49:50] Server Plugins
[04:49:50] --------------
[04:49:50] Loading plugin: streamer.dll
[04:49:50]*** Streamer Plugin v2.3.8 by Incognito loaded ***
[04:49:50] Loaded.
[04:49:50] Loading plugin: sscanf.dll
[04:49:50][04:49:50] ===============================
[04:49:50] sscanf plugin loaded.
[04:49:51] (c) 2009 Alex "Y_Less" Cole
[04:49:51] ===============================
[04:49:51] Loaded.
[04:49:51] Loading plugin: mysql.dll
[04:49:51]> MySQL plugin R4-2 successfully loaded.
[04:49:51] Loaded.
[04:49:51] Loaded 3 plugins.[04:49:51]
[04:49:51] Filter Scripts
[04:49:51] ---------------
[04:49:51] Loaded 0 filter scripts.[04:49:51] Number of vehicle models: 0
----------
Loaded log file: "server_log.txt".
----------SA-MP Dedicated Server
----------------------
v0.3c, (C)2005-2010 SA-MP Team[10:33:07] filterscripts = "" (string)
[10:33:07]
[10:33:07] Server Plugins
[10:33:07] --------------
[10:33:07] Loading plugin: streamer.so
[10:33:07]*** Streamer Plugin v2.3.8 by Incognito loaded ***
[10:33:07] Loaded.
[10:33:07] Loading plugin: sscanf.so
[10:33:07][10:33:07] ===============================
[10:33:07] sscanf plugin loaded.
[10:33:07] (c) 2009 Alex "Y_Less" Cole
[10:33:07] ===============================
[10:33:07] Loaded.
[10:33:07] Loading plugin: mysql.so
[10:33:08]> MySQL plugin R5 successfully loaded.
[10:33:08] Loaded.
[10:33:08] Loaded 3 plugins.[10:33:08]
[10:33:08] Filter Scripts
[10:33:08] ---------------
[10:33:08] Loaded 0 filter scripts.[10:33:08] Number of vehicle models: 0
Und hier mal die Include im Script
#include <a_samp> //
#include <a_mysql>
#include <zcmd>
#include <sscanf2>Weiss einer woran das liegt ?
-
Also so sieht es bei mir zur zeit ganz unten im public OnPlayerCommandReceived(playerid, cmdtext[])
{}
else
{
SendClientMessage(playerid, COLOR_GREY, " Du bist kein Beamter!");
}
}//not connected
return 1;
}
return 1;
}Kann es sein das es an mein public OnPlayerCommandReceived liegt weil es ja eigentlich
public OnPlayerCommandText(playerid, cmdtext[])
{
Hiesst ?Und hier mal vill ein sache wo es dran liegt also da habe ich nicht mit dini gearbeitet ?
COMMAND:afk(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
new afktext[32];
if(!sscanf(params, "s", afktext))
{
if(AFK[playerid] == 0)
{
if(PlayerCuffed[playerid] == 0 || PlayerTied[playerid] == 0 || Umkleideraum[playerid] == 0)
{
new str[256], sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(str, sizeof(str), "INFO: %s ist nun [A]way [F]rom [K]eyboard (/afklist)! Grund: %s", sendername, afktext);
SendClientMessageToAll(COLOR_BRIGHTRED, str);
SendClientMessage(playerid, COLOR_WHITE, "Du bist in einer komplizierten Virtuellen Welt - Mit /back kommst du dort wieder raus.");
AFK[playerid] = 1;
AFKTxt[playerid] = afktext;
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
AFKPos[playerid][0] = X;
AFKPos[playerid][1] = Y;
AFKPos[playerid][2] = Z;
GetPlayerHealth(playerid, AFKha[playerid][0]);
GetPlayerArmour(playerid, AFKha[playerid][1]);
SetPlayerHealth(playerid, 9999999999);
for (new w = 0; w < 13; w++)
{
GetPlayerWeaponData(playerid, w, AFKweapons[playerid][w][0], AFKweapons[playerid][w][1]);
}
BT_ResetPlayerWeapons(playerid);
}
}
else SendClientMessage(playerid, COLOR_WHITE, "Du bist bereits AFK komme mit /back zurück.");
}
else SendClientMessage(playerid, COLOR_RED, "VERWENDUNG: /afk [Grund]");
}
return 1;
}Könnte mir einer sagen ob das was damit zu tun hat ?
Guten Morgen nochmal alle zusammen also ich habe jetzt mal versucht das ganze
public OnPlayerCommandReceived(playerid, cmdtext[])
{
Neu einzufügen habe ich auch getahn aber es passiert nichts anders auser nach jeden befehl der im Chat steht "SERVER: Unknown Command"
Und ich verstehe nicht wieso das so ist ich habe Dini und noch welche wie z.b zcmd und ss
hier mal meine include die oben im script stehen.#pragma dynamic 8192
#include <a_samp>
#include <a_players>
#include <core>
#include <float>
#include <time>
#include <file>
#include <utils>
#include <dini>
#include <morphinc>
#include <gametexte>
#include <zcmd>
#include <foreach>
#include <Double-O-Icons>
#include <F_Streamer>Ich weiss erlich nicht wieso das so ist das immer bei jeden befehl den ich eingebe "SERVER: Unknown Command" kommt ?
Also so lange wie ich mit Pawno zu tun habe hatte ich noch nie so ein fehler kann mir jemand helfen dabei ?Edit: Status & Text eingefügt
Edit2: Text eingefügt -
Den fehler habe ich auch irgend wie kann da einer helfen ?
Das kommt jedes mal zwar wenn ich /help mache stehen die befehle aber dann zu letzt steht das da. ?
Ich brauche ganz dringend hilfe dabei....Zitatganz unten von den ganzen commands als return 1;, return SendClentMessage(..,...,...);
Wie meinst du das genau ?
Ich habe grade mitbekommen das es an der neuen SA-MP version liegt kann mir einer sagen wie ich das mache das nicht immer unter den befehlen auch nochmal sowas kommt "SERVER: Unknown command" hier mal ein befehl wie ich das unter public OnPlayerCommandReceived(playerid, cmdtext[])
{ habe hier:
if(strcmp(cmd, "/help", true) == 0 || strcmp(cmd, "/hilfe", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pLocator] == 1) {
SendClientMessage(playerid, COLOR_GRAD4,"*** Handy-Locator *** /locate"); }if(PlayerInfo[playerid][pJob] == 1) {
SendClientMessage(playerid,COLOR_GRAD5,"*** JOB *** /find"); }
else if(PlayerInfo[playerid][pJob] == 2) {
SendClientMessage(playerid,COLOR_GRAD5,"*** JOB *** /free"); }
else if(PlayerInfo[playerid][pJob] == 3) {
SendClientMessage(playerid,COLOR_GRAD5,"*** JOB *** /sex"); }
else if(PlayerInfo[playerid][pJob] == 4) {
SendClientMessage(playerid,COLOR_GRAD5,"*** JOB *** /selldrugs /get drogen"); }
else if(PlayerInfo[playerid][pJob] == 5) {
SendClientMessage(playerid,COLOR_GRAD5,"*** JOB *** Fahre zum Büro beim HafenKran in SanFierro!"); }
else if(PlayerInfo[playerid][pMember] == 9) {
SendClientMessage(playerid,COLOR_GRAD5,"*** JOB *** /paper /papers /live /news [text]"); }
else if(PlayerInfo[playerid][pJob] == 7) {
SendClientMessage(playerid,COLOR_GRAD5,"*** JOB *** Warte auf neue Aufträge..."); }
else if(PlayerInfo[playerid][pJob] == 8) {
SendClientMessage(playerid,COLOR_GRAD5,"*** JOB *** /guard"); }
else if(PlayerInfo[playerid][pJob] == 9) {
SendClientMessage(playerid,COLOR_GRAD5,"*** JOB *** /materials /sellgun"); }
else if(PlayerInfo[playerid][pJob] == 10) {
SendClientMessage(playerid,COLOR_GRAD5,"*** JOB *** /get wurscht /hotdog"); }
else if(PlayerInfo[playerid][pJob] == 12) {
SendClientMessage(playerid,COLOR_GRAD5,"*** JOB *** /fight /boxstats"); }
else if(PlayerInfo[playerid][pJob] == 14) {
SendClientMessage(playerid,COLOR_GRAD5,"*** JOB *** /fare"); }
else if(PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16) {
SendClientMessage(playerid,COLOR_GRAD5,"*** West Side Boys *** /lator"); }
else if(PlayerInfo[playerid][pJob] == 15) {
SendClientMessage(playerid,COLOR_GRAD5,"*** JOB *** /papers /bring /deliver"); }
else if(PlayerInfo[playerid][pJob] == 16) {
SendClientMessage(playerid,COLOR_GRAD5,"*** JOB *** /load /sellprods /buyprods TIPP: Beim TruckerHof in LS in Richtung SF!"); }ShowPlayerFractionCommands(playerid);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
SendClientMessage(playerid, COLOR_LIGHTRED,"Für das Adminmenu tippe /Adminhilfe ein.");
}
// SendClientMessage(playerid, COLOR_LIGHTRED,"*** Anderes *** /cellphonehelp /househelp /renthelp /businesshelp /leaderhelp /fishhelp /cookhelp /irchelp");
}
// return 1;
return SendClientMessage(playerid, COLOR_GRAD4,"..");
}Edit - Text eingefügt
Edit2 - Text eingefügt -
Sinnlos wenn man keine richtige hilfe bekommt.....
-
Zitat
Du musst
Pawn-Quelltext
1return 0;
zu
Pawn-Quelltext
1return 1;
setzen
Habe jetzt alle return0; auf return1; gesetzt und trozdem kommt der fehler ?
Kann einer mir sagen was ich dagegen tun kann ? -
Zitat
Meinste Mapicons oder was?
Ja genau also ich habe das alte noch drin wie mache ich das am besten das dass neue bei mir im Script funktioniert ? -
Guten Morgen,
ich habe irgend wie ein fehler im Script bei mir kommt immer eine melden wenn ich irgend ein befehl eingebe also diese meldung: [ SERVER: UNKNOWN COMMAND ] Jetzt frage ich mich wie löse ich den fehler kann einer mir helfen ?
Also ich weiss nicht kann das wegen return oder so sein aber ich kapier nicht warum das bei alle befehle so kommt das Server: Unknown Command ?
Weiss einer vieleicht weiter was man tun kann ?Edit -- Text verändert
-
Ok danke kann einer mir sagen wie ich den Streamer im mein Script richtig einfüge ?
-
Wie wo was meinst du genau ?
Ich möchte ja das mein Server geht !!
-
Ja haber ich unter
public OnGameModeInit()
{Und hier nochmal meine include:
#include <a_samp>
#include <a_players>
#include <core>
#include <float>
#include <time>
#include <file>
#include <utils>
#include <dini>
#include <gametexte>
#include <zcmd>
#include <foreach>
#include <SII>
#include <fade>
#include <sscanf2>Und hier meine server.cfg
echo Executing Server Config...
lanmode 0
rcon_password kkkk
maxplayers 500
port 7777
hostname Test Server | 2011 | sa-mp 0.3c | by sa-mp.com
gamemode0 script 1
filterscripts
plugins sscanf.so
announce 0
query 1
weburl www.sa-mp.com
maxnpc 10
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
password kkkkkWoW ich sehe grade habe richtig viele Objecte im Script eingefügt gehabt und das habe ich alles so gemacht.
public OnGameModeInit()
{
LadeObjekte();forward LadeObjekte();
public LadeObjekte()
{
CreateObject(3934, 2293.9350585938, 2437.9135742188, 45.977523803711, 0, 0, 0);
CreateObject(4876, 799.98138427734, -3203.9494628906, -0.70477688312531, 359, 2.7349853515625, 275.81884765625);
// Das sind nur 2 Objecte aber es sind im Script um die [ 1.500 - 1.900 ] Objecte drin.
}Kann das daran vieleicht liegen das der Server das GM irgend wie nicht läd ?
Edit -- Text eingefügt
Edit - Fehler eingefügt -
Was meinst du ich habe doch SetGameModeText("Gamemode");
bei mir drin ?
Weiss einer weiter was ich machen kann das dass Script auch funktioniert ?Edit - - Text eingefügt
-
Oba nunja es muss einer sein der für gf gut geeignet ist ?
Hier habe irgend wie komischen fehler jetzt also wenn ich Server Starte dann ist bei meine Server anzeige das:
ZitatHostName: Test Server
Address:
Players: 0 / 500
Ping: 20
Mode: Unknown
Map: San AndreasMuss ich irgend wie noch bei den includes noch plugings benutzen ?
#include <file>
#include <utils>
#include <dini>
#include <gametexte>
#include <zcmd>
#include <foreach>
#include <SII>
#include <fade>
#include <sscanf2>
#include <Double-O-Icons>Hier mal die server.log
ZitatLoaded log file: "server_log.txt".
----------SA-MP Dedicated Server
----------------------
v0.3c, (C)2005-2010 SA-MP Team[06:55:21] filterscripts = "" (string)
[06:55:21]
[06:55:21] Server Plugins
[06:55:21] --------------
[06:55:21] Loading plugin: sscanf.so
[06:55:21][06:55:21] ===============================
[06:55:21] sscanf plugin loaded.
[06:55:21] (c) 2009 Alex "Y_Less" Cole
[06:55:21] ===============================
[06:55:21] Loaded.
[06:55:21] Loaded 1 plugins.[06:55:21]
[06:55:21] Filter Scripts
[06:55:21] ---------------
[06:55:21] Loaded 0 filter scripts.
[06:55:21]
[06:55:21]
[06:55:21] Number of vehicle models: 44Edit--- Habe fehler eingefügt
-
Habe geguckt habe es alles es müsste eig gehn kennt ihr auser Streamer.inc noch ein anderen guten Object Streamer ?