if (strcmp(cmdtext, \"/map1\", true) == 0) { if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF, \"admin cmd!\"); SpawnPlayer(TEAM_1); SpawnPlayer(TEAM_2); SpawnPlayer(TEAM_3); SetPlayerPos(TEAM_1,-1331.5000,-40.4000,14.1484); SetPlayerPos(TEAM_2,-1190.0000,-181.9000,14.1484); SetPlayerPos(TEAM_3,-1228.7000,-78.4000,27.3713); return 1; } if (strcmp(cmdtext, \"/map2\", true) == 0) {if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF, \"admin cmd!\"); SpawnPlayer(TEAM_1); SpawnPlayer(TEAM_2); SpawnPlayer(TEAM_3); SetPlayerPos(TEAM_1,2794.0728,-2417.4148,13.6321); SetPlayerPos(TEAM_2,2647.9607,-2505.0376,13.4922); SetPlayerPos(TEAM_3,2730.9927,-2450.9575,17.5937); return 1; }
new gTeam[MAX_PLAYERS];new map;#define TEAM_1 1#define TEAM_2 2#define TEAM_3 3
if (strcmp(cmdtext, \"/map1\", true) == 0) { if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF, \"admin cmd!\"); map = 1; for(new i; i <= MAX_PLAYERS; i++) { if(gTeam == TEAM_1) return SetPlayerPos(i,-1331.5000,-40.4000,14.1484); if(gTeam == TEAM_2) return SetPlayerPos(i,-1190.0000,-181.9000,14.1484); if(gTeam == TEAM_3) return SetPlayerPos(i,-1228.7000,-78.4000,27.3713); } return 1; }if (strcmp(cmdtext, \"/map2\", true) == 0) { if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF, \"admin cmd!\"); map = 2; for(new i; i <= MAX_PLAYERS; i++) { if(gTeam == TEAM_1) return SetPlayerPos(i,2794.0728,-2417.4148,13.6321); if(gTeam == TEAM_2) return SetPlayerPos(i,2647.9607,-2505.0376,13.4922); if(gTeam == TEAM_3) return SetPlayerPos(i,2730.9927,-2450.9575,17.5937); } return 1; }
public OnPlayerSpawn(playerid) {if(map == 1 && gTeam[playerid] == TEAM_1) return SetPlayerPos(playerid,-1331.5000,-40.4000,14.1484);if(map == 1 && gTeam[playerid] == TEAM_2) return SetPlayerPos(playerid,-1190.0000,-181.9000,14.1484);if(map == 1 && gTeam[playerid] == TEAM_3) return SetPlayerPos(playerid,-1228.7000,-78.4000,27.3713);if(map == 2 && gTeam[playerid] == TEAM_1) return SetPlayerPos(playerid,2794.0728,-2417.4148,13.6321);if(map == 2 && gTeam[playerid] == TEAM_2) return SetPlayerPos(playerid,2647.9607,-2505.0376,13.4922);if(map == 2 && gTeam[playerid] == TEAM_3) return SetPlayerPos(playerid,2730.9927,-2450.9575,17.5937); return 1;}