new Float:RandomSpawnsSwat[][] = { {1775.8531,-1303.9132,120.2586,272.4887}, {1774.5525,-1306.3617,120.2586,274.0972}, {1774.6008,-1301.7284,120.2586,270.8802}, {1771.9750,-1303.1437,120.2586,265.5953}, {1778.1970,-1303.5835,120.2586,271.5696} }; new Float:RandomSpawnsArmy[][] = { {1833.1782,-1292.7540,120.2656,10.1452}, {1827.6752,-1291.5758,120.2656,17.0386}, {1831.7612,-1308.2998,120.2656,182.9397}, {1827.4015,-1309.8148,120.2656,178.1143} }; public OnPlayerSpawn(playerid) { if(gTeam[playerid] = TEAM_SWAT) //on this line { new Random = random(sizeof(RandomSpawnsSwat)); SetPlayerPos(playerid, RandomSpawnsSwat[Random][0], RandomSpawnsSwat[Random][1], RandomSpawnsSwat[Random][2]); SetPlayerFacingAngle(playerid, RandomSpawnsSwat[Random][3]); } else if(gTeam[playerid] = TEAM_ARMY) //and this one { new Random = random(sizeof(RandomSpawnsSwat)); SetPlayerPos(playerid, RandomSpawnsArmy[Random][0], RandomSpawnsArmy[Random][1], RandomSpawnsArmy[Random][2]); SetPlayerFacingAngle(playerid, RandomSpawnsArmy[Random][3]); } return 1; }
if(gTeam[playerid] = TEAM_SWAT) //on this line |
else if(gTeam[playerid] = TEAM_ARMY) //and this one |
if(gTeam[playerid] == TEAM_SWAT) //on this line |
else if(gTeam[playerid] == TEAM_ARMY) //and this one |
This forum requires that you wait 120 seconds between posts. Please try again in 1 seconds. |
instead of
and do this: and so write "==" in a conditional instead of "=" because with '=' you assign a value, and with '==' you check whether the two values are the same. |