mysql randomly reseting players data..
#1

anyhelp?
Reply
#2

lol? more info.. omg.
Reply
#3

Quote:
Originally Posted by The_Moddler
Посмотреть сообщение
lol? more info.. omg.
LMFAO... +1, dude.
Reply
#4

Quote:
Originally Posted by The_Gangstas
Посмотреть сообщение
anyhelp?
Your Saving function fails / being saved before the player variables is loaded.

Though.. next time Describe your problem a bit better will you?
Reply
#5

okk erm..

pawn Код:
stock SavePlayerAccount(playerid)
{
    if(IsLogged[playerid] == 1)
    {
    print("Start Saving Player Accounts..");
    new Escape[1][MAX_PLAYER_NAME];
    mysql_real_escape_string(Playername(playerid), Escape[0]);
    new Query[1024];
    format(Query, sizeof(Query),"UPDATE `Accounts` SET `AdminLevel`=%d,`DonaterRank`=%d,`Money`=%d,`Score`=%d,`Kills`=%d,`Deaths`=%d,`WantedLevel`=%d,`DrunkLevel`=%d,`FightingStyle`=%d,`RobSkill`=%d,`Seconds`=%d,`Minutes`=%d,`Hours`=%d,`Days`=%d,`CopSkill`=%d,`Regular`=%d,`Tickets`=%d,`TicketsCollected`=%d,`Arrests`=%d,`Bank`=%d,`PayDays`=%d,`PayChecks`=%d,`DrugSeeds`=%d,`Weed`=%d,`LastCrime1`='%s',`LastCrime2`='%s',`LastCrime3`='%s',`LastCrime4`='%s',`LastCrime5`='%s'",
    PlayerInfo[playerid][AdminLevel],PlayerInfo[playerid][pDonaterRank],
    PlayerInfo[playerid][Money],GetPlayerScore(playerid),PlayerInfo[playerid][Kills],PlayerInfo[playerid][Deaths],
    GetPlayerWantedLevel(playerid),GetPlayerDrunkLevel(playerid),GetPlayerFightingStyle(playerid),
    PlayerInfo[playerid][RobSkill],LoggedSeconds[playerid],LoggedMinutes[playerid],LoggedHours[playerid],LoggedDays[playerid],
    PlayerInfo[playerid][pRegular],PlayerInfo[playerid][CopSkill],PlayerInfo[playerid][Tickets],PlayerInfo[playerid][TicketsCollected],PlayerInfo[playerid][Arrests],
    PlayerInfo[playerid][pBank],PlayerInfo[playerid][pPayDay],PlayerInfo[playerid][pPayCheck],
    PlayerInfo[playerid][Seeds],PlayerInfo[playerid][WeedAmount],PlayerInfo[playerid][LastCrime1],PlayerInfo[playerid][LastCrime2],
    PlayerInfo[playerid][LastCrime3],PlayerInfo[playerid][LastCrime4],PlayerInfo[playerid][LastCrime5]);
   
    format(GlobalQuery, sizeof(GlobalQuery),"%s, `Condoms` = %d,`Wallets`=%d,`C4s`=%d,`Gang`='%s',`Gangid`=%d,`Mafia`=%d,`Swat`=%d,`LifeInsurance`=%d,`HealthInsurance`=%d WHERE Username = '%s' LIMIT 1",
    Query,PlayerInfo[playerid][Condoms],PlayerInfo[playerid][Wallets],PlayerInfo[playerid][C4s],
    PlayerInfo[playerid][Gang],PlayerInfo[playerid][Gangid],PlayerInfo[playerid][MafiaMember],PlayerInfo[playerid][SwatMember],
    PlayerInfo[playerid][LifeInsurance],PlayerInfo[playerid][HealthInsurance],Escape[0]);

    mysql_query(GlobalQuery);
    print("Finished Saving Player Accounts..");
    //print(GlobalQuery);
    }
    return 1;
}
// 27 second timer
pawn Код:
public SavePlayerTimer()
{
    foreach(Player,i)
    {
        SavePlayerAccount(i);
    }
    return 1;
}
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    SavePlayerAccount(playerid);
anything else
Reply
#6

Try splitting the querys up.

Add some printf("%s", Query); to see if the Query string actually does contain the numbers / strings it should.

Also: if you /rcon gmx, bugs mysql.
Reply
#7

oh.. i was gmxing l0l?

so is there any other gmx way.. i have a /gmx command thatsaves accs then sets a timer..

is restarting from serverffs control panel same as gmxing?
Reply
#8

Quote:
Originally Posted by The_Gangstas
Посмотреть сообщение
oh.. i was gmxing l0l?

so is there any other gmx way.. i have a /gmx command thatsaves accs then sets a timer..

is restarting from serverffs control panel same as gmxing?
Raise an ServerFFS ticket and ask how their servers get's restarted.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)