Some questions - 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: Some questions (
/showthread.php?tid=352203)
Some questions -
MarinacMrcina - 18.06.2012
Hi,I don't understand this,can someone please tell me what would every of this do:
And whats || and && and what means !=
Thanks!
pawn Код:
if(GetPVarInt(playerid,"Admin") != 0 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid,RED,"You are not an admin!");
pawn Код:
if(GetPVarInt(playerid,"Admin") != 0 || !IsPlayerAdmin(playerid)) return SendClientMessage(playerid,RED,"You are not an admin!");
pawn Код:
if(GetPVarInt(playerid,"Admin") == 0 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid,RED,"You are not an admin!");
pawn Код:
if(GetPVarInt(playerid,"Admin") == 0 || IsPlayerAdmin(playerid)) return SendClientMessage(playerid,RED,"You are not an admin!");
Re: Some questions -
Crazymax - 18.06.2012
|| = or
&& = and
****** or go to sa-mp wiki is it really that simple?
Re: Some questions -
PrawkC - 18.06.2012
Quote:
Originally Posted by Crazymax
|| = or
&& = and
****** or go to sa-mp wiki is it really that simple?
|
is it really that hard?*
https://sampwiki.blast.hk/wiki/Control_Structures#Operators
Re: Some questions -
MarinacMrcina - 18.06.2012
Quote:
Originally Posted by PrawkC
|
Thanks for that link,I could not find that!!
+rep