question
#4

Don't create a new stock, just add
PHP код:

new INI:File INI_Open(UserPath(playerid)); 
    
INI_SetTag(File,"data"); 
    
INI_WriteInt(File,"Faction",PlayerInfo[playerid][pFaction]);//saves the players faction id on disconnect 
    
INI_WriteInt(File,"Facrank",PlayerInfo[playerid][pFacrank]);//saves the players faction rank on disconnect 
    
INI_WriteInt(File,"Facleader",PlayerInfo[playerid][pFacleader]);//saves the players faction leadership status on disconnect 
    
INI_Close(File); 
too the stock already created OR just do this

PHP код:

public OnPlayerDisconnect(playeridreason

    new 
discstring[128]; 
    switch(
reason
    { 
        case 
0format(discstringsizeof(discstring), "* %s has left the server. [ Timeout ]"GetName(playerid)); 
        case 
1format(discstringsizeof(discstring), "* %s has left the server. [ Leaving ]"GetName(playerid)); 
        case 
2format(discstringsizeof(discstring), "* %s has left the server. [ Kicked ]"GetName(playerid)); 
    } 
    
ProxDetector(30.0playeriddiscstringCOLOR_YELLOWCOLOR_YELLOWCOLOR_YELLOWCOLOR_YELLOWCOLOR_YELLOW);
    new 
INI:File INI_Open(UserPath(playerid)); 
    
INI_SetTag(File,"data"); 
    
INI_WriteInt(File,"Faction",PlayerInfo[playerid][pFaction]);//saves the players faction id on disconnect 
    
INI_WriteInt(File,"Facrank",PlayerInfo[playerid][pFacrank]);//saves the players faction rank on disconnect 
    
INI_WriteInt(File,"Facleader",PlayerInfo[playerid][pFacleader]);//saves the players faction leadership status on disconnect 
    
INI_Close(File);
    
SaveAccountInfo(playerid); 
    return 
1

Reply


Messages In This Thread
question - by Jaua10 - 11.07.2018, 16:08
Re: question - by BeckzyBoi - 11.07.2018, 16:17
Re: question - by Jaua10 - 11.07.2018, 16:56
Re: question - by ItsRobinson - 11.07.2018, 16:59
Re: question - by Jaua10 - 11.07.2018, 17:06

Forum Jump:


Users browsing this thread: 2 Guest(s)