Server Disconnect
#1

After i use /q , the server Disconnect

This is my OnPlayerDisconnect

PHP Code:
public OnPlayerDisconnect(playeridreason)
{
    new 
pname[24];
    new 
string[128];
    
GetPlayerName(playerid,pname,sizeof(pname));
    
format(string,sizeof(string),"%s(%d) Has Left the server",pname,playerid);
    
SendClientMessageToAll(COLOR_ADMIN,string);
    
    
PlayerInfo[playerid][pTJailTime] =JailTime[playerid];
    
PlayerInfo[playerid][pWantedLevel] =GetPlayerWantedLevel(playerid);
    
    
ResetVariables(playerid);
    
    new 
INI:File INI_Open(UserPath(playerid));
    
INI_SetTag(File,"data");
    
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
    
INI_WriteInt(File,"BankCash",PlayerInfo[playerid][pBankCash]);
    
INI_WriteInt(File,"Score",GetPlayerScore(playerid));
    
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
    
INI_WriteInt(File,"VIP",PlayerInfo[playerid][pVIP]);
    
INI_WriteInt(File,"RegularPlayer",PlayerInfo[playerid][pRegularPlayer]);
    
INI_WriteInt(File,"ArmyLand",PlayerInfo[playerid][pArmyLand]);
    
INI_WriteInt(File,"ArmyAir",PlayerInfo[playerid][pArmyAir]);
    
INI_WriteInt(File,"Warns",PlayerInfo[playerid][pWarns]);
    
INI_WriteInt(File,"SavedJailTime",PlayerInfo[playerid][pTJailTime]);
    
INI_WriteInt(File,"WantedLevel",PlayerInfo[playerid][pWantedLevel]);
    
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
    
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
    
INI_WriteInt(File,"Banned",PlayerInfo[playerid][pBanned]);
    
INI_Close(File);
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)