11.07.2018, 16:17
I guess:
Код:
public OnPlayerDisconnect(playerid, reason) { new discstring[128]; switch(reason) { case 0: format(discstring, sizeof(discstring), "* %s has left the server. [ Timeout ]", GetName(playerid)); case 1: format(discstring, sizeof(discstring), "* %s has left the server. [ Leaving ]", GetName(playerid)); case 2: format(discstring, sizeof(discstring), "* %s has left the server. [ Kicked ]", GetName(playerid)); } ProxDetector(30.0, playerid, discstring, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW); SaveAccountInfo(playerid); return 1; } SaveAccountInfo(playerid) { 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); }