Bancommand ORM SQL
#5

On disconnect:
pawn Код:
g_MysqlRaceCheck[playerid]++;
    if(Player[playerid][IsLoggedIn] && Player[playerid][ID] > 0)
        orm_save(Player[playerid][ORM_ID]); //if Player[playerid][ID] has a valid value, orm_save sends an UPDATE query, else an INSERT query
    orm_destroy(Player[playerid][ORM_ID]);
Which should save everything stored in this on disconnection:
pawn Код:
enum E_PLAYERS
{
    ORM:ORM_ID,

    ID,
    Name[MAX_PLAYER_NAME],
    Password[129],
    Money,
    Kills,
    Deaths,
    AdminLevel,
    bool:IsLoggedIn,
    bool:CanSellCar,
    bool:IsRegistered,
    LoginAttempts,
    Banned,
    BannedBy,
    BanReason,
    BanTime,
    UnbanTime,
    LoginTimer
};
new Player[MAX_PLAYERS][E_PLAYERS];
It's not a problem with it saving, it's just giving the wrong banreason and bannedby as it seems..
Reply


Messages In This Thread
Bancommand ORM SQL - by Markus1337 - 14.01.2015, 22:26
Re: Bancommand ORM SQL - by Schneider - 14.01.2015, 22:33
Re: Bancommand ORM SQL - by Markus1337 - 14.01.2015, 22:56
Re: Bancommand ORM SQL - by xVIP3Rx - 14.01.2015, 23:15
Re: Bancommand ORM SQL - by Markus1337 - 14.01.2015, 23:37
Re: Bancommand ORM SQL - by xVIP3Rx - 14.01.2015, 23:54
Re: Bancommand ORM SQL - by Markus1337 - 15.01.2015, 00:29
Re: Bancommand ORM SQL - by Markus1337 - 15.01.2015, 02:53
Re: Bancommand ORM SQL - by xVIP3Rx - 15.01.2015, 09:50

Forum Jump:


Users browsing this thread: 2 Guest(s)