Restrict Playerclass to Rank - 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: Restrict Playerclass to Rank (
/showthread.php?tid=88666)
Restrict Playerclass to Rank -
Adamrcook - 28.07.2009
So i've created ranks for my DM server, and now I want to restrict a player class to a certain rank. How would I do this? I just thought that maybe this would work:
Код:
AddPlayerClass(188,2133.3352,2732.0762,10.8203,355.7582,5,1,25,1000,29,1000); // ID 6
{
if(GetPlayerRank(playerid) == 2)
{
else
{
SendClientMessage(playerid, 0xFF0000AA, "Sorry, this command is only for players with rank 2");
}
}
But it's obviously not, so how can i do this the right way?
Re: Restrict Playerclass to Rank -
Abernethy - 28.07.2009
What about this..
pawn Код:
if (GetPlayerRank(playerid) >= 2)
{
SpawnPlayer(playerid)
}
else
{
ForceClassSelection(playerid);
GameTextForPlayer(playerid, "~w~Level ~r~2~w~+ only", 2000, 5);
}