12.09.2011, 14:16
I am working on a capture the flag DM, and if a player from blue team captures the red team flag, he will be teleported to the blue team spawn, BUT all the other blue team members will not be teleported then :S.
Is there a command to teleport all player with "if(GetPlayerTeam(playerid) == 1)" ?
So what I want is to only teleport the players from the winning team back to their spawn, and not the players that are outside the DM zone.
heres my code:
Thanks in advance
Is there a command to teleport all player with "if(GetPlayerTeam(playerid) == 1)" ?
So what I want is to only teleport the players from the winning team back to their spawn, and not the players that are outside the DM zone.
heres my code:
Код:
if(pickupid == redflag) { if(GetPlayerTeam(playerid) == 0) { SendClientMessage(playerid, COLOR_WHITE, "You have captured the flag, Your team wins"); SendClientMessageToAll(COLOR_WHITE, "Blue team has won!"); SetPlayerPos(playerid, -608.4156, 1830.7487, 7.0000); return 1; } }