[SOLVED]/exit dm
#3

Quote:
Originally Posted by Pinny
Use a command like this

Код:
  if (strcmp("/exit", cmdtext, true, 10) == 0) {

//SETS THEIR POS SOMEWHERE, or where ever you want them to teleport back to. this is just an example.

      SetPlayerPos(playerid,2352.0007,-1168.8942,27.9879);
      SetPlayerInterior(playerid, 0);
      return 1;
    }
That wont work, because the commands are disabled when they are in a /dm, How can i make it so if there in a dm zone "PlayerData[playerid][InDM] = 1;" they can only use /exit?

--edit: I figured it out, it had to be like this:
Код:
if(strcmp("/exit", cmdtext, true, 10) == 0)
  {
  if(PlayerData[playerid][InDM] == 1)
  return 1;
  {
  TogglePlayerControllable(playerid,true);
  SetCameraBehindPlayer(playerid);
  SpawnPlayer(playerid);
  PlayerData[playerid][InDM] = 0;
  SendClientMessage(playerid,COLOR_YELLOW,"You have left the death match");
  return 0;
  }
  }
thanks guys
Reply


Messages In This Thread
[SOLVED]/exit dm - by DarkClone - 06.11.2009, 10:13
Re: /exit dm - by Pinehole - 06.11.2009, 10:41
Re: /exit dm - by DarkClone - 06.11.2009, 10:50
Re: /exit dm - by RenisiL - 06.11.2009, 11:04

Forum Jump:


Users browsing this thread: 1 Guest(s)