28.01.2015, 11:44
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:
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;
}