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;
}
Print where you set the cash, you most probably do it multiple times for some people.
what you mean print for set the cash? Thats the saving code for cash. do i show my login/register??