How to use or
#1

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?
Reply
#2

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)
Reply
#3

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

You don't make a buffer at the return.

pawn Код:
if(response) // if response is not 0 it's always true
    return GetPlayerWeapon(playerid);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)