Restrict Playerclass to Rank
#1

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

What about this..
pawn Код:
if (GetPlayerRank(playerid) >= 2)
{
SpawnPlayer(playerid)
}
else
{
ForceClassSelection(playerid);
GameTextForPlayer(playerid, "~w~Level ~r~2~w~+ only", 2000, 5);
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)