Admin cmd, Not authorized help please -
Lukka_Vercetti - 22.07.2014
hello, having trouble with my robbank cmd
its telling me im not authorized to use it
+rep will be given
http://pastebin.com/keRx0P4s
Re: Admin cmd, Not authorized help please -
GShock - 22.07.2014
Double check if your admin level is more than 6 again.
Re: Admin cmd, Not authorized help please -
Lukka_Vercetti - 22.07.2014
na its not mate its 0 is none 6 is highest
Re: Admin cmd, Not authorized help please -
Kebab- - 22.07.2014
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.
Re: Admin cmd, Not authorized help please -
Lukka_Vercetti - 22.07.2014
nope still says You're not Authorized to use that command
is there a way just to make it
if(AdminDuty[playerid] == 6)
Re: Admin cmd, Not authorized help please -
NaClchemistryK - 22.07.2014
I don't quite get it, do you only want users having adm rank 6 to use it?
Re: Admin cmd, Not authorized help please -
Lukka_Vercetti - 22.07.2014
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
Re: Admin cmd, Not authorized help please -
flamur2012 - 22.07.2014
post us a code maybe we could help then.
Re: Admin cmd, Not authorized help please -
Kaperstone - 22.07.2014
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)
Re: Admin cmd, Not authorized help please -
NaClchemistryK - 22.07.2014
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.