09.12.2015, 10:12
i need some spawn point for team.i see this https://sampforum.blast.hk/showthread.php?tid=162488 but this isnt my problem.
i use gteam
i use gteam
if(gTeam[playerid] == TEAM_ONE) SetPlayerPos(playerid, X, Y, Z); if(gTeam[playerid] == TEAM_TWO) SetPlayerPos(playerid, otherX, otherY, otherZ);
new Float:TeamOne[][] = { {PosX, PosY, PosZ}, //1st spawn point for team 1 {PosX, PosY, PosZ}, //2nd spawn point for team 1 {PosX, PosY, PosZ} //3rd spawn point for team 1 }; new Float:TeamTwo[][] = { {PosX, PosY, PosZ}, //1st spawn point for team 2 {PosX, PosY, PosZ}, //2nd spawn point for team 2 {PosX, PosY, PosZ} //3rd spawn point for team 2 }; //And when you want to spawn them new rand = random(sizeof(TeamOne)); if(gTeam[playerid] == TEAM_ONE) SetPlayerPos (playerid, TeamOne[rand][0], TeamOne[rand][1], TeamOne[rand][2]); new rand1 = random(sizeof(TeamTwo)); if(gTeam[playerid] == TEAM_TWO) SetPlayerPos (playerid, TeamTwo[rand1][0], TeamTwo[rand1][1], TeamTwo[rand1][2]);