How to use or - 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: How to use or (
/showthread.php?tid=350111)
How to use or -
DragonYancy - 11.06.2012
I'll check player have a gun at his/her slot or not. I used this thing for shotguns ( slot3 )
Код:
(GetPlayerWeapon(playerid) == 25 or 26 or 27)
I made this but, It didn't work. How can I check slots?
AW: How to use or -
Extremo - 11.06.2012
Quote:
Originally Posted by DragonYancy
I'll check player have a gun at his/her slot or not. I used this thing for shotguns ( slot2 )
Код:
(GetPlayerWeapon(playerid) == 25 or 26 or 27)
I made this but, It didn't work. How can I check slots?
|
pawn Код:
new buffer = GetPlayerWeapon(playerid); // this way we dont have to check the players weapons everytime.
if(buffer == 25 || buffer == 26 || buffer == 27)
Re: How to use or -
DragonYancy - 11.06.2012
Extremo thank you for your help. I'll ask another question...
Код:
if(!response == 0) return new buffer = GetPlayerWeapon(playerid);
I meant if there is a response return new buffer = GetPlayerWeapon(playerid);
AW: How to use or -
Extremo - 11.06.2012
You don't make a buffer at the return.
pawn Код:
if(response) // if response is not 0 it's always true
return GetPlayerWeapon(playerid);