SA-MP Forums Archive
[HELP] Problems with Ranks - 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: [HELP] Problems with Ranks (/showthread.php?tid=106741)



[HELP] Problems with Ranks - FreddeN - 05.11.2009

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






Re: [HELP] Problems with Ranks - klavins - 05.11.2009

try to use 0 instead of 1.


Re: [HELP] Problems with Ranks - FreddeN - 05.11.2009

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


Re: [HELP] Problems with Ranks - yom - 05.11.2009

<= mean less or equal to.


Re: [HELP] Problems with Ranks - FreddeN - 05.11.2009

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...


Re: [UNSOLVED] Problems with Ranks - FreddeN - 05.11.2009

Any idea before we can close this subject?