Beiträge von KillerTyp
-
-
-
Wahrscheinlich fehlt immernoch was , was ihr jetzt wahrscheinlich schon 10 mal geschrieben habt ich aber zu doof bin!
savePlayer(playerid){ if(pInfo[playerid][eingeloggt]==0)return 1; new query[128], Float:healt; format(query,sizeof(query),"UPDATE user SET level='%i',money='%i', alevel='%i', health='%f' WHERE id='%i'",pInfo[playerid][level],GetPlayerMoney(playerid),pInfo[playerid][alevel],GetPlayerHealth(playerid, healt),pInfo[playerid][id]); mysql_function_query(dbhandle,query,false,"",""); return 1;}
Wieso is das immer nur eine Zeile? -.-
[00:19:05] [DEBUG] mysql_connect - host: "localhost", user: "root", database: "samp", password: "****", port: 3306, autoreconnect: true
[00:19:05] [DEBUG] CMySQLHandle::Create - creating new connection..
[00:19:05] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
[00:19:05] [DEBUG] CMySQLHandle::Create - connection created with ID = 1
[00:19:05] [DEBUG] CMySQLConnection::Connect - connection was successful
[00:19:05] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[00:19:05] [DEBUG] CMySQLConnection::Connect - connection was successful
[00:19:05] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[00:19:12] [DEBUG] mysql_connect - host: "localhost", user: "root", database: "samp", password: "****", port: 3306, autoreconnect: true
[00:19:12] [DEBUG] CMySQLHandle::Create - creating new connection..
[00:19:12] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
[00:19:12] [DEBUG] CMySQLHandle::Create - connection created with ID = 1
[00:19:12] [DEBUG] CMySQLConnection::Connect - connection was successful
[00:19:12] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[00:19:12] [DEBUG] CMySQLConnection::Connect - connection was successful
[00:19:12] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[00:19:21] [DEBUG] mysql_tquery - connection: 1, query: "SELECT id FROM user WHERE username='Ilyas'", callback: "OnUserCheck", format: "i"
[00:19:21] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called
[00:19:21] [DEBUG] mysql_tquery - scheduling query "SELECT id FROM user WHERE username='Ilyas'"..
[00:19:21] [DEBUG] CMySQLQuery::Execute[OnUserCheck(i)] - starting query execution
[00:19:21] [DEBUG] CMySQLQuery::Execute[OnUserCheck(i)] - query was successful
[00:19:21] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[00:19:21] [DEBUG] CMySQLQuery::Execute[OnUserCheck(i)] - data being passed to ProcessCallbacks()
[00:19:21] [DEBUG] Calling callback "OnUserCheck"..
[00:19:21] [DEBUG] cache_get_data - connection: 1
[00:19:21] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[00:19:21] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called
[00:19:24] [DEBUG] mysql_escape_string - source: "qrahq9ds", connection: 1, max_len: 35
[00:19:24] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM user WHERE username='Ilyas' AND passwort=MD5('qrah", callback: "OnPasswordResponse", format: "i"
[00:19:24] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called
[00:19:24] [DEBUG] mysql_tquery - scheduling query "SELECT * FROM user WHERE username='Ilyas' AND passwort=MD5('qrahq9ds')"..
[00:19:24] [DEBUG] CMySQLQuery::Execute[OnPasswordResponse(i)] - starting query execution
[00:19:24] [DEBUG] CMySQLQuery::Execute[OnPasswordResponse(i)] - query was successful
[00:19:24] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[00:19:24] [DEBUG] CMySQLQuery::Execute[OnPasswordResponse(i)] - data being passed to ProcessCallbacks()
[00:19:24] [DEBUG] Calling callback "OnPasswordResponse"..
[00:19:24] [DEBUG] cache_get_data - connection: 1
[00:19:24] [DEBUG] cache_get_field_content_int - row: 0, field_name: "level", connection: 1
[00:19:24] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "level", data: "10"
[00:19:24] [DEBUG] cache_get_field_content_int - row: 0, field_name: "id", connection: 1
[00:19:24] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "id", data: "10"
[00:19:24] [DEBUG] cache_get_field_content_int - row: 0, field_name: "money", connection: 1
[00:19:24] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "money", data: "14500"
[00:19:24] [DEBUG] cache_get_field_content_int - row: 0, field_name: "alevel", connection: 1
[00:19:24] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "alevel", data: "3"
[00:19:24] [DEBUG] cache_get_field_content_float - row: 0, field_name: "health", connection: 1
[00:19:24] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "health", data: "0"
[00:19:24] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[00:19:24] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called
[00:19:56] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE user SET level='10',money='14400', alevel='3', health='0.", callback: "(null)", format: "(null)"
[00:19:56] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called
[00:19:56] [DEBUG] mysql_tquery - scheduling query "UPDATE user SET level='10',money='14400', alevel='3', health='0.000000' WHERE id='10'"..
[00:19:56] [DEBUG] CMySQLQuery::Execute[()] - starting query execution
[00:19:56] [DEBUG] CMySQLQuery::Execute[()] - query was successful
[00:19:56] [DEBUG] CMySQLQuery::Execute[()] - no callback specified, skipping result saving
[00:19:56] [DEBUG] CMySQLQuery::Execute[()] - data being passed to ProcessCallbacks()
[00:19:56] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called -
-
Ich versuchs!
Immernoch 0!
Log: (GANZ SCHÖN VIEL!!!)
[00:02:21] [DEBUG] mysql_connect - host: "localhost", user: "root", database: "samp", password: "****", port: 3306, autoreconnect: true
[00:02:21] [DEBUG] CMySQLHandle::Create - creating new connection..
[00:02:21] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
[00:02:21] [DEBUG] CMySQLHandle::Create - connection created with ID = 1
[00:02:21] [DEBUG] CMySQLConnection::Connect - connection was successful
[00:02:21] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[00:02:21] [DEBUG] CMySQLConnection::Connect - connection was successful
[00:02:21] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[00:02:29] [DEBUG] mysql_tquery - connection: 1, query: "SELECT id FROM user WHERE username='Ilyas'", callback: "OnUserCheck", format: "i"
[00:02:29] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called
[00:02:29] [DEBUG] mysql_tquery - scheduling query "SELECT id FROM user WHERE username='Ilyas'"..
[00:02:29] [DEBUG] CMySQLQuery::Execute[OnUserCheck(i)] - starting query execution
[00:02:29] [DEBUG] CMySQLQuery::Execute[OnUserCheck(i)] - query was successful
[00:02:29] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[00:02:29] [DEBUG] CMySQLQuery::Execute[OnUserCheck(i)] - data being passed to ProcessCallbacks()
[00:02:29] [DEBUG] Calling callback "OnUserCheck"..
[00:02:29] [DEBUG] cache_get_data - connection: 1
[00:02:29] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[00:02:29] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called
[00:02:32] [DEBUG] mysql_escape_string - source: "qrahq9ds", connection: 1, max_len: 35
[00:02:32] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM user WHERE username='Ilyas' AND passwort=MD5('qrah", callback: "OnPasswordResponse", format: "i"
[00:02:32] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called
[00:02:32] [DEBUG] mysql_tquery - scheduling query "SELECT * FROM user WHERE username='Ilyas' AND passwort=MD5('qrahq9ds')"..
[00:02:32] [DEBUG] CMySQLQuery::Execute[OnPasswordResponse(i)] - starting query execution
[00:02:32] [DEBUG] CMySQLQuery::Execute[OnPasswordResponse(i)] - query was successful
[00:02:32] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[00:02:32] [DEBUG] CMySQLQuery::Execute[OnPasswordResponse(i)] - data being passed to ProcessCallbacks()
[00:02:32] [DEBUG] Calling callback "OnPasswordResponse"..
[00:02:32] [DEBUG] cache_get_data - connection: 1
[00:02:32] [DEBUG] cache_get_field_content_int - row: 0, field_name: "level", connection: 1
[00:02:32] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "level", data: "10"
[00:02:32] [DEBUG] cache_get_field_content_int - row: 0, field_name: "id", connection: 1
[00:02:32] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "id", data: "10"
[00:02:32] [DEBUG] cache_get_field_content_int - row: 0, field_name: "money", connection: 1
[00:02:32] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "money", data: "14600"
[00:02:32] [DEBUG] cache_get_field_content_int - row: 0, field_name: "alevel", connection: 1
[00:02:32] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "alevel", data: "3"
[00:02:32] [DEBUG] cache_get_field_content_int - row: 0, field_name: "health", connection: 1
[00:02:32] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "health", data: "0"
[00:02:32] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[00:02:32] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called
[00:02:55] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE user SET level='10',money='14500', alevel='3', health='0.", callback: "(null)", format: "(null)"
[00:02:55] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called
[00:02:55] [DEBUG] mysql_tquery - scheduling query "UPDATE user SET level='10',money='14500', alevel='3', health='0.000000' WHERE id='10'"..
[00:02:55] [DEBUG] CMySQLQuery::Execute[()] - starting query execution
[00:02:55] [DEBUG] CMySQLQuery::Execute[()] - query was successful
[00:02:55] [DEBUG] CMySQLQuery::Execute[()] - no callback specified, skipping result saving
[00:02:55] [DEBUG] CMySQLQuery::Execute[()] - data being passed to ProcessCallbacks()
[00:02:55] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called -
-
Ou!!!! Stimmt danke! Ich probiers mal schnell aus!
//edit : Tag mismatch
savePlayer(playerid){ if(pInfo[playerid][eingeloggt]==0)return 1; new query[128], float:healt; format(query,sizeof(query),"UPDATE user SET level='%i',money='%i', alevel='%i', health='%f' WHERE id='%i'",pInfo[playerid][level],GetPlayerMoney(playerid),pInfo[playerid][alevel],GetPlayerHealth(playerid, healt),pInfo[playerid][id]); mysql_function_query(dbhandle,query,false,"",""); return 1;}
Bin ich zu doof?
-
Hi Leute,
ich habe ein Problem undzwar wollte ich meine Health speichern aber irgendwie geht es nicht! Ich bitte um Hilfe!savePlayer(playerid){if(pInfo[playerid][eingeloggt]==0)return 1;new query[128];format(query,sizeof(query),"UPDATE user SET level='%i',money='%i', alevel='%i', health='%i' WHERE id='%i'",pInfo[playerid][level],GetPlayerMoney(playerid),pInfo[playerid][alevel],GetPlayerHealth(playerid),pInfo[playerid][id]);mysql_function_query(dbhandle,query,false,"","");return 1;}
Fehler in der 3 Zeile! Bei Format!
-
if(dialogid==DIALOG_EINZAHLEN)
{
if(response==1)
{
if(!IsNumeric(inputtext))return SendClientMessage(playerid,COLOR_RED,"Du musst einen Betrag ab 1 $ eintragen um Geld einzahlen zu können.");ShowPlayerDialog(playerid,DIALOG_EINZAHLEN,DIALOG_STYLE_INPUT,"Bank - Geld einzahlen","Gib hier bitte den Betrag ein den du einzahlen möchtest.","Einzahlen","Abbrechen");
{
new betrag = inputtext[DIALOG_EINZAHLEN];
GivePlayerMoney(playerid, -betrag);
SetPVarInt(playerid,"Kontostand",GetPVarInt(playerid,"Kontostand")+betrag);
return 1;
}
}
if(response==0)
{
SendClientMessage(playerid,COLOR_RED,"Du hast den Vorgang abgebrochen.");
return 1;
}
} -
Er meint ich würde einen Betrag unter 1 Dollar eingeben!
-
Er meint
C:\Users\Ilyas\Desktop\Server\SAMP Server\gamemodes\UR.pwn(1822) : error 017: undefined symbol "IsNumeric"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase1 Error.
-
bin zu blöd das is mir neu kannst du es ein bischen besser erklären?
-
Ich habe hier das System aber wie soll ich auslesen ob der Spieler eine Zahl als Inputtext benutzt hat?
Mein Code:
if(dialogid==DIALOG_EINZAHLEN)
{
if(response==1)
{
if(inputtext[DIALOG_EINZAHLEN] >= 1)
{
new betrag = inputtext[DIALOG_EINZAHLEN];
GivePlayerMoney(playerid, -betrag);
SetPVarInt(playerid,"Kontostand",GetPVarInt(playerid,"Kontostand")+betrag);
}
SendClientMessage(playerid,COLOR_RED,"Du musst einen Betrag ab 1 Dollar eintragen um Geld einzahlen zu können.");
ShowPlayerDialog(playerid,DIALOG_EINZAHLEN,DIALOG_STYLE_INPUT,"Bank - Geld einzahlen","Gib hier bitte den Betrag ein den du einzahlen möchtest.","Einzahlen","Abbrechen");
return 1;
}
if(response==0)
{
SendClientMessage(playerid,COLOR_RED,"Du hast den Vorgang abgebrochen.");
return 1;
}
} -
new mschein[] = {461,463,468,521,522,523,581,586};
new lkwschein[] = {403,406,407,408,414,427,428,433,443,455,456,499,514,515,524,544,573,578};
new flugschein[] = {417,425,447,460,469,476,487,488,497,511,512,513,519,520,548,553,563,577,592,593};
new bootschein[] = {430,446,452,453,454,472,473,484,493,595};
new autoschein[] = {400,401,402,404,405,409,410,411,412,413,415,416,418,419,421,422,423,424,426,429,434,436,439,440,442,445,451,458,459,466,467,470,474,475,478,479,480,482,483,489,490,491,492,494,495,496,498,500,502,503,504,505,506,507,508,516,517,518,525,526,527,528,529,531,532,533,534,535,536,539,540,541,542,543,545,546,547,549,550,551,552,554,555,558,559,560,561,562,565,566,567,568,571,572,574,575,576,579,580,582,585,587,589,596,597,598,599,600,601,602,603,604,605}; -
-
Hallo Leute,
mein Führerschein funktioniert nicht. Ich habe jetzt nähmlich verschiedene Führerscheine eingebaut!Meine Errors:
C:\Users\Ilyas\Desktop\Server\SAMP Server\gamemodes\UR.pwn(1126) : error 029: invalid expression, assumed zero
C:\Users\Ilyas\Desktop\Server\SAMP Server\gamemodes\UR.pwn(1133) : error 029: invalid expression, assumed zero
C:\Users\Ilyas\Desktop\Server\SAMP Server\gamemodes\UR.pwn(1140) : error 029: invalid expression, assumed zero
C:\Users\Ilyas\Desktop\Server\SAMP Server\gamemodes\UR.pwn(1147) : error 029: invalid expression, assumed zero
C:\Users\Ilyas\Desktop\Server\SAMP Server\gamemodes\UR.pwn(1154) : error 029: invalid expression, assumed zeroMein Script (Ausschnitt):
if(newstate==PLAYER_STATE_DRIVER)
{
if(vModel)
{
if(vModel==autoschein[])//error 1
{
if(!havePlayerAnAFSchein(playerid,1))
{
SendClientMessage(playerid,COLOR_RED,"Du hast keinen Auto-Führerschein.");
}
}
else if(vModel==bootschein[])//Error 2
{
if(!havePlayerAnBFSchein(playerid,1))
{
SendClientMessage(playerid,COLOR_RED,"Du hast keinen Boots-Führerschein.");
}
}
else if(vModel==flugschein[])//error 3
{
if(!havePlayerAnFFSchein(playerid,1))
{
SendClientMessage(playerid,COLOR_RED,"Du hast keinen Flug-Schein.");
}
}
else if(vModel==lkwschein[])//error 4
{
if(!havePlayerAnLKWFSchein(playerid,1))
{
SendClientMessage(playerid,COLOR_RED,"Du hast keinen LKW-Führerschein.");
}
}
else if(vModel==mschein[])//error 5
{
if(!havePlayerAnMFSchein(playerid,1))
{
SendClientMessage(playerid,COLOR_RED,"Du hast keinen Motorrad-Führerschein.");
}
}
}
} -
Hmm jetzt respawnen die aber nicht!
-
Nein Moment! Mann soll ja oben mehrere definen können!!!!!! Aber ich habe noch ne frage:
//Meine Fraktionsfahrzeuge
new lspdcars[18];
new fbicars[15];
new mediccars[8];
new gscars[7];enum fcrEnum{
fcr_fid,
fcr_fcar,
}new fcrInfo[][fcrEnum] = {
{1,lspdcars}
};Wenn ich das mache kommt ein error
-
Kuck dir mal das Script an! Ich weis nicht wie ich das definieren muss also was die Objekt id ist ich habs ja als enum!
Ich hab da was rein gemacht
MoveObject(WAS MUSS HIER REIN,gInfo[g_gx],gInfo[g_gy],gInfo[g_gz],3); -
Hallo leute,
ich habe immernoch das Problem mit den Fraktionstoren! Ich hatte schon 2 threads aber die habe ich gelöscht.
Ich habe ein Enum für alle Fraktionstore. Wie kann ich die Tore jetzt auslesen?enum TuT{
Float:g_x,
Float:g_y,
Float:g_z,
Float:g_gx,
Float:g_gy,
Float:g_gz,
g_frakt,
g_fraktm,
}new gInfo[][TuT] = {
{Meine Koordinaten}//LSPD GGate
};ocmd:torauf(playerid,params[])
{for(new i=0; i<sizeof(gInfo); i++)
{
if(!IsPlayerInRangeOfPoint(playerid,10,gInfo[i][g_x],gInfo[i][g_y],gInfo[i][g_z]))continue;
if(isPlayerInFrakt(playerid,gInfo[i][g_frakt]))return SendClientMessage(playerid,COLOR_RED,gInfo[i][g_fraktm]);
MoveObject(WAS MUSS HIER REIN,gInfo[g_gx],gInfo[g_gy],gInfo[g_gz],3);
return 1;
}
return 1;
}