04.01.2012, 03:08
The problem is sometimes when a registered player connects, sometimes he will the doubled cash he has, the others are fine but the cash is doubling.
pawn Код:
public Save(playerid)
{
if(Logged[playerid] == 1 && spawned[playerid] == 1)
{
GetPlayerName(playerid,pname,sizeof(pname));
GetPlayerPos(playerid,X,Y,Z);
format(query,sizeof(query),"UPDATE accounts SET PosX = %f,PosY = %f,PosZ = %f,Interior = %d,Vworld = %d,Cash = %d,Level = %d WHERE Name = '%s'",
X,Y,Z,GetPlayerInterior(playerid),GetPlayerVirtualWorld(playerid),GetPlayerMoney(playerid),GetPlayerScore(playerid),pname);
mysql_query(query);
}
return 1;
}