Operators
Hello,
Can I check an value against two different operators? |
Re: Operators
Explain better, not sure what you are talking about
|
Re: Operators
PHP Code:
I am trying to force the client to have at least 1 weapon in his/her hand. which should work with just PHP Code:
so Im first trying to isolate if it is 1 weapon. then if it is one weapon I will disable the ability to drop by checking if its > 0. so people wouldn't be able to drop further if they got an snarks,satchels,tripmines with 1 weapon in hand. but I dont know how to check the same value against two different operators, if possible. |
Re: Operators
well, the num > 0 will always get called because user has at least 1 weapon in the check above..
so you could put only num > 0 and return handled.. it will do the same. i`m still confuse of what you're trying to do. if user has at least one weapon you block drop command? ( that's what your code from above does ). |
Re: Operators
This doesn't make sense. num will contain the ammo for that particular weapon. Also, if num is 1 then it will ALWAYS be greater than zero.
|
Re: Operators
fysiks you are confusing get_user_weapon and get_user_weapons.
About problem, may be you are focused on the wrong thing. What does trigger those crashes ? I thinkk there could be something to fix in custom weapons plugins. |
Re: Operators
well it is an pretty confusing one. what red_bull mentioned I was aware off.
lets say I do this PHP Code:
as I move I pick up weapons from the ground i.e. gauss,rpg,mp5. then I execute the drop command as many times as I can. I will be left with one weapon in my hand, works perfectly. now the same thing I go into hldm game, spawn etc but along the way I pick up gauss,rpg,mp5,tripmine. then I execute the drop command as many times as I can. I will be left with zero weapons in hand. why? I dont know. think because weapon_tripmine (weapon_satchel and snarks) are not recognized as weapons I assume by amxmodx core but as ammo. the best fix I can think of temporarily for this is PHP Code:
but that is no fix ofcourse :P |
Re: Operators
alright alternatively with fakemeta
PHP Code:
or cant drop weapon_crowbar would work as well. can use some help here. |
| All times are GMT -4. The time now is 15:52. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.