06.11.2009, 18:02
Oops sorry mate didn't realise you were using the SA:MP team system
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)
{
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;
}
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;
}