not working cmd - 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: not working cmd (
/showthread.php?tid=415585)
not working cmd -
pelani - 13.02.2013
PHP код:
if(PlayerInfo[playerid][aLevel] > PlayerInfo[playerid][aLevel]) return SendClientMessage(playerid, COLOR_RED, "Admin Usage: The person's level is higher than yours!");
not working? i think i wrong ">" btw can u tell me what is good? lower admin can't ban higher admin and higher admin can ban lower.
which one is work? "<" or ">=" "=<"
Re: not working cmd -
lavamike - 13.02.2013
pawn Код:
if(PlayerInfo[playerid][aLevel] > PlayerInfo[playerid][aLevel]) return SendClientMessage(playerid, COLOR_RED, "Admin Usage: The person's level is higher than yours!");
You're using 'playerid' twice. so lets say playerid is the admin using /ban. you need to change the first part to the id of the player your trying to ban like:
pawn Код:
if(PlayerInfo[bannedid][aLevel] > PlayerInfo[playerid][aLevel]) return SendClientMessage(playerid, COLOR_RED, "Admin Usage: The person's level is higher than yours!");
The > is right in that sense, your saying "If the admin level of the guy being banned is greater than the admin level of the admin using /ban then return the message.
Alternatively you could use >= to prevent admins from banning players with the same admin level as them. Does that help?
Re: not working cmd -
blackdragon1 - 13.02.2013
he dnt want like this
Re: not working cmd -
pelani - 13.02.2013
Quote:
Originally Posted by blackdragon1
he dnt want like this
|
u r right and yes i dnt want like this and this is not my ban cmd i was just give u example i means lower admin can't do higher admin.