Sharing commnads... - 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: Sharing commnads... (
/showthread.php?tid=394572)
Sharing commnads... -
Tee - 23.11.2012
I totally forgot how to use the || (or operator) to allow let's say admins and donators to share the same command.
Like this:
pawn Код:
if(PlayerData[playerid][AdminLevel] < 1 || PlayerData[playerid][DonorLevel] < 2)return 0;
It always returns 0...
Re: Sharing commnads... -
Tee - 23.11.2012
Nevermind, it's the nor operator:
if(!(left || right))
Therefore: if(!(PlayerData[playerid][AdminLevel] < 1 || PlayerData[playerid][DonorLevel] < 2))return 0;