MYSQL Saving
#1

Ok, hi, so I, or maybe i should say WE, have a stock here to save a player, and yes, we have remembered to put SavePlayer() in OnPlayerDisconnect, but it isn't saving, no matter what I try, here's the stock;

pawn Код:
stock SavePlayer(playerid)
{
    if(GetPVarInt(playerid, "Logged") == 1) //Yes, this is set to 1 when the player logs in.
    {
        AvoidOOSync();
        new query[1050];
        new alevel,leet,money,score,planesteals,kills,deaths,banned,muted;
        alevel = GetPVarInt(playerid, "Admin");
        leet = GetPVarInt(playerid, "Elite");
        money = GetPlayerMoney(playerid);
        score = GetPlayerScore(playerid);
        planesteals = GetPVarInt(playerid, "Planes");
        muted = GetPVarInt(playerid, "Muted");
        kills = GetPVarInt(playerid, "Kills");
        deaths = GetPVarInt(playerid, "Deaths");
        mysql_format(MySqlConnection,query,"UPDATE users SET ALevel='%i',Leet='%i',Money='%i',Score='%i',PlaneSteals='%i',Kills='%i',Deaths'%i',Banned='%i',Muted='%i' WHERE Playername='%e'", alevel,leet,money,score,planesteals,kills,deaths,banned,muted, GetName(playerid));
        mysql_query(query);
        printf("Saved Details: %s",GetName(playerid));
    }
    return 1;
}
Thanks for any help in advance,
-Aston and Nodroz.
Reply


Messages In This Thread
MYSQL Saving - by AstonDA-G - 12.12.2011, 18:04
AW: MYSQL Saving - by C0dy09 - 12.12.2011, 18:09
Re: MYSQL Saving - by AstonDA-G - 12.12.2011, 18:12
Re: MYSQL Saving - by TheArcher - 12.12.2011, 18:15
Re: MYSQL Saving - by Sergei - 12.12.2011, 18:19

Forum Jump:


Users browsing this thread: 1 Guest(s)