Load a level with a command?
#1

I just started this script:

Код:
	if(strcmp(cmd, "/loadmylevel", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
         PlayerInfo[playerid][pLevel] = I DON'T KNOW HERE;
      }
    }


public OnPlayerDisconnect(playerid, reason)
{
   [SOMETHING HERE]
}
What I mean, is that, when he disconnects from the server, it saves his level (pLevel) in a .txt with his name (like, Test_Test.txt contains the number 3 in the file), and when he reconnects, he types /loadmylevel and then the number that is written in the file will be his level, and the file will be erased too.

ty
Reply


Messages In This Thread
Load a level with a command? - by anumaz - 06.07.2009, 14:42
Re: Load a level with a command? - by GTA_Rules - 06.07.2009, 14:43
Re: Load a level with a command? - by anumaz - 06.07.2009, 14:44
Re: Load a level with a command? - by GTA_Rules - 06.07.2009, 14:54
Re: Load a level with a command? - by anumaz - 06.07.2009, 14:57
Re: Load a level with a command? - by GTA_Rules - 06.07.2009, 14:58
Re: Load a level with a command? - by anumaz - 06.07.2009, 14:59
Re: Load a level with a command? - by anumaz - 06.07.2009, 16:43
Re: Load a level with a command? - by ByFukara - 06.07.2009, 16:44
Re: Load a level with a command? - by anumaz - 06.07.2009, 16:49

Forum Jump:


Users browsing this thread: 1 Guest(s)