Duplicate stats.
#1

Hello. Does anyone have any ideas why stats is duplicate? When i go in server create my account everything is Okay. But when i quit game. And go in server from same Pc with new nick. I register. And my stats its same like first profile. But when i restart server and create new profile, stats is like it be on defualt register player. Do any have suggestions why it is?

If need script: http://pastebin.com/ijKGRiiL
Yea i kno. Script is shity.
Reply
#2

You have to clear the variables, make something like this.

Код:
OnPlayerDisconnect(playerid, reason)
{
     PlayerInfo[playerid][VARIABLE] = 0;
     AND SET ALL THE ENUM VALUES TO 0 LIKE THIS.
}
problem fixed.
Reply
#3

Reset all stats when players disconnect. Like:
PHP код:
PlayerInfo[playerid][pAdmin]=0;
PlayerInfo[playerid][pKills]=0;
Wantedlevel[playerid]=0;
//etc.... 
Reply
#4

Oh thanks.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)