Guten Tag Com,
Und zwar möchte ich nun wenn ich vom Server gehe das meine Daten speichern.
Code:
public OnPlayerDisconnect(playerid,reason)
{
new query[150],name[MAX_PLAYER_NAME+1];
GetPlayerName(playerid,name,sizeof name);
mysql_real_escape_string(name,name);
format(query,sizeof query,"UPDATE `Accounts` SET `Adminlevel` = %d WHERE `Nickname` = '%s'",pInfo[playerid][Adminlv],name);
mysql_query(query);
mysql_free_result();
return 1;
}
Und wenn ich mich einlogge das meine Daten sich Laden
Code:
new name[MAX_PLAYER_NAME+1],query[150];
GetPlayerName(playerid,name,sizeof name);
GetFromAccount(name,"Passwort",pInfo[playerid][Passwort]);
if(!strcmp(inputtext,pInfo[playerid][Passwort]))
{
TextDrawShowForPlayer(playerid, login1);
TextDrawShowForPlayer(playerid, login2);
TextDrawShowForPlayer(playerid, login3);
TextDrawShowForPlayer(playerid, login4);
TextDrawShowForPlayer(playerid, login5);
TextDrawShowForPlayer(playerid, login6);
TextDrawShowForPlayer(playerid, login9);
TextDrawShowForPlayer(playerid, login11);
TextDrawHideForPlayer(playerid, blackTD);
mysql_real_escape_string(name,name);
format(query,sizeof query,"SELECT * FROM `Accounts` WHERE `Nickname` = '%s'",name);
mysql_query(query);
mysql_store_result();
while(mysql_fetch_row_format(query))
sscanf(query,"e<p<|>s[24]s[128]d>",pInfo[playerid]);
SpawnPlayer(playerid);
}
Ich weiss nicht weiter wie ich dies nun machen soll.
Ich hoffe hier sind welche die mir helfen können.
Mfg
Maadison