19.07.2012, 09:30
the == check is for a match. if you want to check for a "not match", use the != to modify your second code snippet. the first one looks ok:
if player is NOT admin, OR if hes not VIP (neither one or both), then execute the code in the { } brackets. the first check will fail, so add:
checking for a player being (admin AND vip) is irrelevant as long as one criteria is met to use the command.
omg that looks complicated. in short, avoid this:
pawn Код:
if(player_Admin[playerid] == 1 || player_VIP[playerid] == 1)
{
//player is 1) admin, 2) VIP, or 3) admin and vip, execute kick-code.
}
pawn Код:
else
{
...tell the player who typed that command, that hes not admin nor vip, so he cannot use it, and return 1; .
}
omg that looks complicated. in short, avoid this:
pawn Код:
!player_Admin[playerid] == 1

