Register problems - OnPlayerDisconnect
#1

Hello!

Problem is the following, whenever I disconect without registering my account it will automaticly make file into Scriptfiles. - I think I'm missing "if" statement but I'm new with y_ini so I have to ask for help.

Code:
pawn Code:
public OnPlayerDisconnect(playerid, reason)
{
    Failed[playerid] = 0;
    new INI:file = INI_Open(Path(playerid));
    INI_SetTag(file,"Player's Data");
    INI_WriteInt(file,"AdminLevel",pInfo[playerid][Adminlevel]);
    INI_WriteInt(file,"VIPLevel",pInfo[playerid][VIPlevel]);
    INI_WriteInt(file,"Money",GetPlayerMoney(playerid));
    INI_WriteInt(file,"Scores",GetPlayerScore(playerid));
    INI_WriteInt(file,"Kills",pInfo[playerid][Kills]);
    INI_WriteInt(file,"Deaths",pInfo[playerid][Deaths]);
    INI_WriteInt(file,"Logins",pInfo[playerid][Logins]);
    INI_Close(file);
    return 1;
}
Reply


Messages In This Thread
Register problems - OnPlayerDisconnect - by Razturach - 28.01.2015, 11:44
Re: Register problems - OnPlayerDisconnect - by nezo2001 - 28.01.2015, 11:49
Re: Register problems - OnPlayerDisconnect - by ATGOggy - 28.01.2015, 11:59
Re: Register problems - OnPlayerDisconnect - by Razturach - 28.01.2015, 12:43

Forum Jump:


Users browsing this thread: 2 Guest(s)