12.12.2011, 18:04
Ok, hi, so I, or maybe i should say WE, have a stock here to save a player, and yes, we have remembered to put SavePlayer() in OnPlayerDisconnect, but it isn't saving, no matter what I try, here's the stock;
Thanks for any help in advance,
-Aston and Nodroz.
pawn Код:
stock SavePlayer(playerid)
{
if(GetPVarInt(playerid, "Logged") == 1) //Yes, this is set to 1 when the player logs in.
{
AvoidOOSync();
new query[1050];
new alevel,leet,money,score,planesteals,kills,deaths,banned,muted;
alevel = GetPVarInt(playerid, "Admin");
leet = GetPVarInt(playerid, "Elite");
money = GetPlayerMoney(playerid);
score = GetPlayerScore(playerid);
planesteals = GetPVarInt(playerid, "Planes");
muted = GetPVarInt(playerid, "Muted");
kills = GetPVarInt(playerid, "Kills");
deaths = GetPVarInt(playerid, "Deaths");
mysql_format(MySqlConnection,query,"UPDATE users SET ALevel='%i',Leet='%i',Money='%i',Score='%i',PlaneSteals='%i',Kills='%i',Deaths'%i',Banned='%i',Muted='%i' WHERE Playername='%e'", alevel,leet,money,score,planesteals,kills,deaths,banned,muted, GetName(playerid));
mysql_query(query);
printf("Saved Details: %s",GetName(playerid));
}
return 1;
}
-Aston and Nodroz.