[HELP] Problems with Ranks
#1

I have created my new Register system, it works good so far, I have also maked a pRank, it saves my Police Rank, I will add /giverank soon...

But that is not the problem, if I make myself Rank 1, and I got a command that looks like this...

Код:
  if (strcmp("/ra", cmdtext, true, 3) == 0)
	{
	  if(GetPlayerTeam(playerid) != 8) return SendClientMessage(playerid,0xFF0000FF, "Identification Error - You are not a Police Officer.");
    if(PlayerInfo[playerid][pRank] <= 1) return SendClientMessage(playerid,0xFF0000FF, "Identification Error - You need LAE Rank 1 to do this.");
		if(cmdtext[3] == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /ra [text]");
    	new playername[26];
    	GetPlayerName(playerid, playername, 26);
    	format(string, sizeof(string), "Radio Call from Officer %s:%s, over**", playername, cmdtext[3]);
    	for(new i=0;i<MAX_PLAYERS;i++)
    	{ if(GetPlayerTeam(playerid) == 8) { SendClientMessage(i, 0x0000FFFF, string); } }
    	return 1;
	}
I got this also in it...

Код:
if(PlayerInfo[playerid][pRank] <= 1)
The problem is that if a Player with Rank 1 tries to use the cmd, it just tells me Identification Error - You need LAE Rank 1 to do this...
But if I put the Player to Rank 2, he/her can use the cmd...

I want players with Rank 1 to use this cmd, not Only higher ranks...

Thanks



Reply
#2

try to use 0 instead of 1.
Reply
#3

Quote:
Originally Posted by klavins
try to use 0 instead of 1.
Hmm,with Rank 0, the Police Cadets can use Police Officer Commands...
Reply
#4

<= mean less or equal to.
Reply
#5

Quote:
Originally Posted by 0rb
<= mean less or equal to.
If I put >= it wont work on any rank, it just tells me I need Rank 1, and I've set my Rank to 1...
And if i try to use <= It only works on Rank 0, and ranks under... like I have Rank 5, and it works on Rank 6...
Reply
#6

Any idea before we can close this subject?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)