12.07.2015, 07:53
Hello, i need help with my login and register system.
I created the login and register system with the help of Kush's Tutorial.
The bug is, when i disconnect, my Admin Level and VIP Level increased one text.
The underlined is the one that increased.
The Account.ini:
My OnPlayerDisconnect:
Any help ?
Sorry for bad english.
I created the login and register system with the help of Kush's Tutorial.
The bug is, when i disconnect, my Admin Level and VIP Level increased one text.
The underlined is the one that increased.
The Account.ini:
Quote:
[Player Account] Password = 306643852 Cash = 35061 Scores = 5 Admin Level = 0 VIP Level = 0 Kills = 0 Deaths = 0 Admin Level = 0 VIP Level = 0 |
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new INI:File = INI_Open(UserPath(playerid));
new sztring[3000];
format(sztring,sizeof(sztring),"%s Account",PlayerName(playerid));
INI_SetTag(File, sztring);
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
INI_WriteInt(File,"Scores",GetPlayerScore(playerid));
INI_WriteInt(File,"Admin Level",pInfo[playerid][pLevel]);
INI_WriteInt(File,"VIP Level",pInfo[playerid][pVIP]);
INI_WriteInt(File,"Kills",pInfo[playerid][pKills]);
INI_WriteInt(File,"Deaths",pInfo[playerid][pDeaths]);
INI_Close(File);
return 1;
}
Sorry for bad english.