SA-MP Forums Archive
How to make this? - 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: How to make this? (/showthread.php?tid=71631)



How to make this? - T.I. - 02.04.2009

How to make a class restricted by the usual players? And it can be joined just by admins?
I have a team, but anyone could join it, so who can help me?


Re: How to make this? - BigPoncho - 02.04.2009

Код:
if(IsPlayerAdmin(playerid))
{
	if (gTeam[playerid] == ADMIN_TEAM)
	{
		if(classid == CLASS_ID_HERE)
		{
		  GameTextForPlayer(playerid, "~r~~n~~n~~n~~n~~n~~n~~n~Admin Restricted", 1000, 3); //Add anything here
		}
	}
	else
	SendClientMessage(playerid, COLOR_HERE, "You're not an admin! You cannot choose this class.");
}
return 1;
Something like that. Change the "ADMIN_TEAM" into the team you've chosen for Admins. Rest is self explanatory. I wrote this pretty fast so not sure if it'll work. It should be in OnPlayerRequestClass.