Only 1 Team_PM - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Only 1 Team_PM (
/showthread.php?tid=76702)
Only 1 Team_PM -
Kyle - 05.05.2009
Hai Guys,
How Would I Do It So That Only 1 Person Can Spawn As Team_PM
Reguards Kyle
Re: Only 1 Team_PM -
miokie - 05.05.2009
At The top of the script
OnGameModeInit
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.
Re: Only 1 Team_PM -
Kyle - 05.05.2009
How do i stop them from spawning though?
Re: Only 1 Team_PM -
miokie - 05.05.2009
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;
}