help needed Plz - 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)
+--- Thread: help needed Plz (
/showthread.php?tid=456251)
help needed Plz -
FireWarrior101 - 05.08.2013
Guys how can i make a rank system so that if he wants to choose Medic class for example he must have 0-150 score atleast
I have defined my ranks.I have added class system on player spawn.
Can u guide me a bit to the rest of it how to create my rank system ?
Re: help needed Plz -
FireWarrior101 - 05.08.2013
also i am getting these errors when scripting /myrank command using zcmd
pawn Код:
/////My RANK//////
COMMAND:myrank(playerid, params[])
{
if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) =< 150)// LINE 554
{
SendClientMessage(playerid, COLOR_GREY, "[SERVER] {FFFFFF}Your Current rank is Cadet");
}
return 1;
}
Errors:
D:\SAMP STUFF\SAMP HOST\gamemodes\Test.pwn(554) : warning 211: possibly unintended assignment
D:\SAMP STUFF\SAMP HOST\gamemodes\Test.pwn(554) : error 022: must be lvalue (non-constant)
D:\SAMP STUFF\SAMP HOST\gamemodes\Test.pwn(554) : error 029: invalid expression, assumed zero
D:\SAMP STUFF\SAMP HOST\gamemodes\Test.pwn(554) : warning 215: expression has no effect
D:\SAMP STUFF\SAMP HOST\gamemodes\Test.pwn(554) : error 001: expected token: ";", but found ")"
D:\SAMP STUFF\SAMP HOST\gamemodes\Test.pwn(554) : fatal error 107: too many error messages on one line
Re: help needed Plz -
FireWarrior101 - 05.08.2013
or is this tutorial poorly or badly explainned i mean if i remove"=" from >= i get no errors
https://sampforum.blast.hk/showthread.php?tid=356607
Re: help needed Plz -
SuperViper - 05.08.2013
Replace
=< with
<=.
Re: help needed Plz -
FireWarrior101 - 05.08.2013
also i tested it and if i do /myrank nothing happens
Re: help needed Plz -
CutX - 05.08.2013
Quote:
Originally Posted by FireWarrior101
also i tested it and if i do /myrank nothing happens
|
if nothing happens, this means you didn't even get past the first if-statement.
instead of using "&&" you have to use "||"
try that:
Код:
if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) <= 150)
also, make sure that ur score really is between 0 and 150
Re: help needed Plz -
FireWarrior101 - 05.08.2013
Solved
+rep
and -rep for nirzor