new Float:RandomSpawns[][] = { {246.5136,1860.1316,14.0840,3.5120},//usa {259.1712,1851.1980,8.7578,350.1835},//usa {246.5136,1860.1316,14.0840,3.5120},//usa {259.1712,1851.1980,8.7578,350.1835},//usa {405.0340,2434.2354,16.5000,0.3332},//europe {386.7775,2544.4758,16.5449,184.4533},//europe {351.2219,2542.2969,16.7338,181.6332}//europe {-384.8250,2206.1545,42.4235,279.4162},//taliban {-384.8250,2206.1545,42.4235,279.4162},//taliban {-418.3107,2228.7891,42.4297,4.9569},//taliban {-431.3057,2241.0020,42.9834,179.7752},//taliban {-377.2758,2242.6189,42.6185,104.5746},//taliban {-375.8265,2260.4126,43.0619,92.9811},//taliban }; public OnPlayerSpawn(playerid) { if (gTeam[playerid] == TEAM_USA) { new Random = random(sizeof(RandomSpawns)); SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1],RandomSpawns[Random][2], RandomSpawns[Random][3]); } // now when I try to continue my array on the other teams I get this error... C:\Users\RAC\Desktop\only server\gamemodes\AW.pwn(18 : error 032: array index out of bounds (variable "RandomSpawns") if (gTeam[playerid] == TEAM_=EUROPE) { ? } if (gTeam[playerid] == TEAM_taliban) { } |
SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1],RandomSpawns[Random][2], RandomSpawns[Random][3]);
}