Heyho, ich habe mal versucht , wie bei Maddin's Tutorial mit MySQL zu arbeiten, das Script hat keine Errors oder Warnings, jedenfalls wenn ich den Server verlasse, speichert nichts und wenn ich Relogge, muss ich mich auch neu Registrieren, obwohl bei Navicat ein Account existiert.
Unter Disconnect usw. steht natürlich alles.
Hier mal mein Speichern stock:
stock SpielerSpeichern(playerid)
{
if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
{
if(GetPVarInt(playerid,"loggedin") == 1)
{
mysql_SetInt("accounts", "admin", GetPVarInt(playerid,"admin"), "Name", SpielerInfo[playerid][sName]);
mysql_SetInt("accounts", "Kills", GetPlayerScore(playerid), "Name", SpielerInfo[playerid][sName]);
mysql_SetInt("accounts", "prison", GetPVarInt(playerid,"prison"), "Name", SpielerInfo[playerid][sName]);
mysql_SetInt("accounts", "zeit", GetPVarInt(playerid,"zeit"), "Name", SpielerInfo[playerid][sName]);
mysql_SetInt("accounts", "Tode", GetPVarInt(playerid,"Tode"), "Name", SpielerInfo[playerid][sName]);
mysql_SetInt("accounts", "warns", GetPVarInt(playerid,"warns"), "Name", SpielerInfo[playerid][sName]);
mysql_SetInt("accounts", "skin", GetPVarInt(playerid,"skin"), "Name", SpielerInfo[playerid][sName]);
mysql_SetInt("accounts", "member", GetPVarInt(playerid,"member"), "Name", SpielerInfo[playerid][sName]);
mysql_SetInt("accounts", "Baned", GetPVarInt(playerid,"Baned"), "Name", SpielerInfo[playerid][sName]);
printf("%s wurde gespeichert.",PlayerName(playerid));
}
}
return 1;
}
Hier mein Laden Stock:
stock LoadAccount(playerid)
{
if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid)
{
GetPlayerName(playerid, SpielerInfo[playerid][sName], MAX_PLAYER_NAME);
SetPVarInt(playerid,"admin",mysql_GetInt("accounts", "admin", "Name", SpielerInfo[playerid][sName]));
SetPVarInt(playerid,"prison",mysql_GetInt("accounts", "prison", "Name", SpielerInfo[playerid][sName]));
SetPVarInt(playerid,"zeit", mysql_GetInt("accounts", "zeit", "Name", SpielerInfo[playerid][sName]));
new score = mysql_GetInt("accounts", "Kills", "Name", SpielerInfo[playerid][sName]);
SetPlayerScore(playerid,score);
SetPVarInt(playerid,"Baned",mysql_GetInt("accounts", "Baned", "Name", SpielerInfo[playerid][sName]));
SetPVarInt(playerid,"Tode", mysql_GetInt("accounts", "Tode", "Name", SpielerInfo[playerid][sName]));
SetPVarInt(playerid,"member", mysql_GetInt("accounts", "member", "Name", SpielerInfo[playerid][sName]));
SetPVarInt(playerid,"skin", mysql_GetInt("accounts", "skin", "Name", SpielerInfo[playerid][sName]));
SetPVarInt(playerid,"warns", mysql_GetInt("accounts", "warns", "Name", SpielerInfo[playerid][sName]));
SetPVarInt(playerid,"loggedin",1);
new frak;
frak = GetPVarInt(playerid,"member");
SetSpawnInfo(playerid,bugfix[frak][0],GetPVarInt(playerid,"skin"),Fraktionsspawns[frak][0],Fraktionsspawns[frak][1],Fraktionsspawns[frak][2],Fraktionsspawns[frak][3],1,1,0,0,0,0);
SpawnPlayer(playerid);
if(GetPVarInt(playerid,"Baned") == 1)
{
SendClientMessage(playerid,0x828282FF,"Du bist gebannt.");
Kick(playerid);
}
return 1;
}
Wisst ihr vielleicht was falsch ist?