not working cmd
#1

PHP код:
if(PlayerInfo[playerid][aLevel] > PlayerInfo[playerid][aLevel]) return SendClientMessage(playeridCOLOR_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 ">=" "=<"
Reply
#2

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

he dnt want like this
Reply
#4

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


Forum Jump:


Users browsing this thread: 1 Guest(s)