help needed Plz
#1

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

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
Reply
#3

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
Reply
#4

Replace =< with <=.
Reply
#5

also i tested it and if i do /myrank nothing happens
Reply
#6

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

Solved
+rep
and -rep for nirzor
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)