little help with the !
#2

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:
pawn Код:
if(player_Admin[playerid] == 1 || player_VIP[playerid] == 1)
{
//player is 1) admin, 2) VIP, or 3) admin and vip, execute kick-code.
}
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:
pawn Код:
else
{
...tell the player who typed that command, that hes not admin nor vip, so he cannot use it, and return 1; .
}
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 Код:
!player_Admin[playerid] == 1
Reply


Messages In This Thread
little help with the ! - by TheDeath - 19.07.2012, 09:02
Re: little help with the ! - by Babul - 19.07.2012, 09:30
Re: little help with the ! - by TheDeath - 19.07.2012, 18:54

Forum Jump:


Users browsing this thread: 1 Guest(s)