How to save stuff on GameModExit?
#3

I made this code on PlayerDisconnect so that it checks if the player has completed registration if not then it deletes the user file of the player and he has to register again.
pawn Код:
if(GetPVarInt(playerid,"Regan")==0)
    {
        new name[MAX_PLAYER_NAME],strPath[128];
        GetPlayerName(playerid,name,sizeof(name));
        format(strPath,sizeof(strPath), "/users/%s.txt",name);
        fremove(strPath);
    }
I Have set SetPVarInt(playerid,"Regan",1) on OnPlayerConnect so if the player disonnect before login his user.txt wont get deleted.

I Have set SetPVarInt(playerid,"Regan",0) on the start of the registration and SetPVarInt(playerid,"Regan",1) when the player finishes it.

Now when I reset my server over /gmx my user.txt in scriptfiles gets deleted.
Reply


Messages In This Thread
How to save stuff on GameModExit? - by MarinacMrcina - 05.06.2012, 22:26
Re: How to save stuff on GameModExit? - by Edward156 - 05.06.2012, 22:29
Re: How to save stuff on GameModExit? - by MarinacMrcina - 05.06.2012, 22:43
Re: How to save stuff on GameModExit? - by milanosie - 05.06.2012, 22:43
Re: How to save stuff on GameModExit? - by iggy1 - 05.06.2012, 22:46
Re: How to save stuff on GameModExit? - by MarinacMrcina - 05.06.2012, 22:53
Re: How to save stuff on GameModExit? - by iggy1 - 05.06.2012, 22:57
Re: How to save stuff on GameModExit? - by MarinacMrcina - 05.06.2012, 23:19

Forum Jump:


Users browsing this thread: 3 Guest(s)