Az elözõ kérésemre való válasz totál buggos volt.
A következõ hiba van: - A csapatokat nem teszi át a megadott pozícióra
- Ha beírom a parancsot akkor csak engem tesz át és a többi játékost nem.
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;
}
Nekem annyi kellene, h a bugok javítása, Pl van 5 játékos TEAM_1-be és 5 játékos TEAM_2-be és szintén 5 TEAM_3-ban ,akkor õket is tegye át a megadott pozíciókra, ha beírom a parancsot ne csak engem.