Teleport Team
#5

Oops sorry mate didn't realise you were using the SA:MP team system

pawn Код:
//-------------------------[Teleport Teams]---------------------------------------------
  if (strcmp(cmd, "/teamteleport", true) == 0)
  {
    for(new i = 0; i <= MAX_PLAYERS; i++)
    {
      if(IsPlayerConnected(i) && GetPlayerTeam[i] == teamid)//Replace teamid with the team ID you wish to teleport
      {
        SetPlayerPos(i,1.1,1.1,1.1);//Change to the co-ordinates you want to teleport them to
      }
    }
    return 1;
  }
Or if you want the teleport to teleport eveyone in the same team as the person using the command:
pawn Код:
//-------------------------[Teleport Teams]---------------------------------------------
  if (strcmp(cmd, "/teamteleport", true) == 0)
  {
    new teamid = GetPlayerTeam(playerid);
    for(new i = 0; i <= MAX_PLAYERS; i++)
    {
      if(IsPlayerConnected(i) && GetPlayerTeam[i] == teamid)//Checks for players in the same team as playerid's team
      {
        SetPlayerPos(i,1.1,1.1,1.1);//Change to the co-ordinates you want to teleport them to
      }
    }
    return 1;
  }
Reply


Messages In This Thread
Teleport Team - by Nameless303 - 05.11.2009, 22:52
Re: Teleport Team - by Redgie - 05.11.2009, 22:57
Re: Teleport Team - by Nameless303 - 05.11.2009, 23:12
Re: Teleport Team - by Nero_3D - 05.11.2009, 23:25
Re: Teleport Team - by Redgie - 06.11.2009, 18:02

Forum Jump:


Users browsing this thread: 1 Guest(s)