Admin cmd, Not authorized help please
#1

hello, having trouble with my robbank cmd
its telling me im not authorized to use it
+rep will be given

http://pastebin.com/keRx0P4s
Reply
#2

Double check if your admin level is more than 6 again.
Reply
#3

na its not mate its 0 is none 6 is highest
Reply
#4

Change
Код:
 if(PlayerInfo[playerid][pAdmin] < 6)
To

Код:
 if(PlayerInfo[playerid][pAdmin] > 5)
You made it so players below Admin Level 6 can only perform the command.
Reply
#5

nope still says You're not Authorized to use that command
is there a way just to make it
if(AdminDuty[playerid] == 6)
Reply
#6

I don't quite get it, do you only want users having adm rank 6 to use it?
Reply
#7

yea i only want admins to be able to togbankrob, like to turn it on and off is what its doing

but its not letting me doit cause says im not authorized to use it
and i am admin lvl 6
Reply
#8

post us a code maybe we could help then.
Reply
#9

Quote:
Originally Posted by Kebab-
Посмотреть сообщение
Change
Код:
 if(PlayerInfo[playerid][pAdmin] < 6)
To

Код:
 if(PlayerInfo[playerid][pAdmin] > 5)
You made it so players below Admin Level 6 can only perform the command.
if it's the highest then why not just use == instead ?
anyhow, check what level are you then by making a test command
pawn Код:
CMD:whatismylevel(playerid, params[]) {
SendClientMessage(player,-1,PlayerInfo[playerid][pAdmin]);
return 1;
}
By the code you've showed everything looks fine, so there is no way that the problem is in the command. (unless you didn't replace what kebab said to replace)
Reply
#10

pawn Код:
if(PlayerInfo[playerid][pAdmin] < 6)
(
//...code...
)
else SendClientMessage(playerid,-1,"You are not authorized to use this command.");
change all that to
pawn Код:
if(PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid,-1,"You are not authorized to use this command");
it is just simpler to write. other ways can irritate you
you don't need if/else all the time, you can just directly return something.
and write everything else below that code.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)