30.07.2018, 13:36
Hi I trying to make a random team spawns but When a SWAT Spawn they will spawn him at Army location's and like others skins too.. why
OnPlayerSpawn
OnPlayerSpawn
PHP код:
if(gTeam[playerid] == PoliceTeam(GetPlayerSkin(playerid)) && FBII(GetPlayerSkin(playerid)))
{
new RandomSpawnP = random(sizeof(RandomSpawnPolice));
SetPlayerPos(playerid, RandomSpawnPolice[RandomSpawnP][0], RandomSpawnPolice[RandomSpawnP][1], RandomSpawnPolice[RandomSpawnP][2]);
SetPlayerFacingAngle(playerid, RandomSpawnPolice[RandomSpawnP][3]);
}
if(gTeam[playerid] == CIA(GetPlayerSkin(playerid)))
{
new RandomSpawnC = random(sizeof(RandomSpawnCIA));
SetPlayerPos(playerid, RandomSpawnCIA[RandomSpawnC][0], RandomSpawnCIA[RandomSpawnC][1], RandomSpawnCIA[RandomSpawnC][2]);
SetPlayerFacingAngle(playerid, RandomSpawnCIA[RandomSpawnC][3]);
}
if(gTeam[playerid] == Army(GetPlayerSkin(playerid)))
{
new RandomSpawnA = random(sizeof(RandomSpawnArmy));
SetPlayerPos(playerid, RandomSpawnArmy[RandomSpawnA][0], RandomSpawnArmy[RandomSpawnA][1], RandomSpawnArmy[RandomSpawnA][2]);
SetPlayerFacingAngle(playerid, RandomSpawnArmy[RandomSpawnA][3]);
}
if(gTeam[playerid] == SWAT(GetPlayerSkin(playerid)))
{
new RandomSpawnS = random(sizeof(RandomSpawnSWAT));
SetPlayerPos(playerid, RandomSpawnSWAT[RandomSpawnS][0], RandomSpawnSWAT[RandomSpawnS][1], RandomSpawnSWAT[RandomSpawnS][2]);
SetPlayerFacingAngle(playerid, RandomSpawnSWAT[RandomSpawnS][3]);
}