SA-MP Forums Archive
mysql problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: mysql problem (/showthread.php?tid=308576)



mysql problem - Tanush123 - 04.01.2012

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;
}



Re: mysql problem - [HiC]TheKiller - 04.01.2012

Print where you set the cash, you most probably do it multiple times for some people.


Re: mysql problem - Tanush123 - 04.01.2012

what you mean print for set the cash? Thats the saving code for cash. do i show my login/register??