[HELP] MySQL saving accounts
#7

Also, System64 don't use 'mysql_free_result' unless you've stored the result.

Here I made the command for you:

pawn Код:
COMMAND:gmx(playerid, params[])
{
    new time;
    if(!IsPlayerAdmin(playerid))return 0;
    foreach(Player,i)
    {
        if(rBit1_Get(IsPlayerLogged, i))
        {
            new escpname[24];
            mysql_real_escape_string(GetName(i), escpname);
            format(Query, sizeof(Query), "UPDATE `racuni` SET `Bodovi` = %d, `Novac` = %d, `Ubojstva` = %d, `Smrti` = %d, `Code` = %d, `Warns` = %d, `Online` = %d, `VIP` = %d, `Admin` = %d WHERE `Korisnik` = '%s'",GetPlayerScore(i), GetPlayerCash(i), PlayerInfo[i][pKills], PlayerInfo[i][pDeaths], PlayerInfo[i][pCode], PlayerInfo[i][pWarns], PlayerInfo[i][pOnline], PlayerInfo[i][pVIP], PlayerInfo[i][pAdmin], escpname);
            mysql_query(Query);
        }
    }
    SendRconCommand("gmx");
    return 1;
}
Reply


Messages In This Thread
[HELP] MySQL saving accounts - by System64 - 16.09.2011, 14:10
Re: [HELP] MySQL saving accounts - by Mean - 16.09.2011, 14:24
Re: [HELP] MySQL saving accounts - by System64 - 16.09.2011, 14:27
Re: [HELP] MySQL saving accounts - by Davz*|*Criss - 16.09.2011, 21:17
Re: [HELP] MySQL saving accounts - by [HiC]TheKiller - 16.09.2011, 21:26
Re: [HELP] MySQL saving accounts - by Kingunit - 16.09.2011, 21:58
Re: [HELP] MySQL saving accounts - by Tee - 16.09.2011, 23:03
Re: [HELP] MySQL saving accounts - by System64 - 17.09.2011, 06:31
Re: [HELP] MySQL saving accounts - by [HiC]TheKiller - 17.09.2011, 06:48
Re: [HELP] MySQL saving accounts - by System64 - 17.09.2011, 06:55

Forum Jump:


Users browsing this thread: 3 Guest(s)