Only 1 Team_PM
#1

Hai Guys,

How Would I Do It So That Only 1 Person Can Spawn As Team_PM

Reguards Kyle
Reply
#2

At The top of the script
pawn Код:
new TeamPM;
OnGameModeInit
pawn Код:
TeamPM = 0;
Where you assign the team
pawn Код:
if(TeamPM == 0)
{
  TeamPM = 1;
  //ASSIGN THE TEAM HERE.
}
else
{
  SendClientMessage(playerid,Color,"Theres already somebody on that team.");
}
Thats how I would do it.
There is proberly a better way but oh well.
Reply
#3

How do i stop them from spawning though?
Reply
#4

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(GetPlayerSkin(playerid) == SKINID_OF_TEAM && TeamPM == 1)
    {
        SendClientMessage(playerid,Color,"Theres already somebody on that team.");
        return 0;
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)