team spawn point
#1

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
Reply
#2

You should probably explain the problem a little more.. What exactly do you want it to do? If you want to spawn people from one team at a specific spot, you can perform a simple check as
Код:
if(gTeam[playerid] == TEAM_ONE) SetPlayerPos(playerid, X, Y, Z);
if(gTeam[playerid] == TEAM_TWO) SetPlayerPos(playerid, otherX, otherY, otherZ);
Since I'm not entirely sure what you mean, my apologies in advance if the above isn't any help.
Reply
#3

random spawn for team.5 spawn point for one team.
Reply
#4

Maybe something like this?

Код:
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]);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)