Some questions
#1

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!");
Reply
#2

|| = or
&& = and

****** or go to sa-mp wiki is it really that simple?
Reply
#3

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
Reply
#4

Quote:
Originally Posted by PrawkC
Посмотреть сообщение
Thanks for that link,I could not find that!!
+rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)