SA-MP Forums Archive
SQL problem when spawning. - 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: SQL problem when spawning. (/showthread.php?tid=403621)



SQL problem when spawning. - Oscii - 30.12.2012

Hello.

When I /q my money saves to the Database etc.

But when I spawn.. noany money!!

Anyone know how to fix this?

PS: Here's my OnPlayerSpawn

pawn Код:
public OnPlayerSpawn(playerid) {
    // Let's check if the player has logged in. Have they not? Let's kick them.
    new string[128];
    if(playerVariables[playerid][pStatus] != 1){
    if(playerVariables[playerid][pAdmin]){
    format(string, sizeof(string), "SERVER: {FFFFFF}You are logged in as level %d administrator.", playerVariables[playerid][pAdmin]);
    SendClientMessage(playerid, COLOR_NICERED, string);}
    SetPlayerColor(playerid, COLOR_GREY);
    GivePlayerMoney(playerid, playerVariables[playerid][pMoney]);
    SendClientMessage(playerid, COLOR_GREY, "You need to login before you can spawn.");
    return Kick(playerid);
    }

    return 1;
}