Get secondary weapon?
How to get someone's secondary weapon (pistol) even if they are not holding it?
|
Re: Get secondary weapon?
You should get all weapons of the player and create a bit const with ids of pistols., that means:
Code:
|
Re: Get secondary weapon?
Thank you!
|
Re: Get secondary weapon?
Or the better way:
PHP Code:
|
Re: Get secondary weapon?
Quote:
Thank you. Is there a way to directly get the weapon name from WeaponEnt or is get_weaponname necessary? |
Re: Get secondary weapon?
get_weaponname through weapon index and not through entity index or GetHamItemInfo through entity index.
|
Re: Get secondary weapon?
How would I do it with GetHamItemInfo?
|
Re: Get secondary weapon?
I'm not sure why you don't want to use get_weaponname... anyway, it's only for amx 1.8.3 and I believe you are using amx 1.8.2. Also, you just need to take a look at hamsandwich.inc and ham_cost.inc to understand how it works.
|
Re: Get secondary weapon?
I switched to 1.8.3 recently. I will see if I can find out how it works.
|
Re: Get secondary weapon?
pev_classname on WeaponEnt or get_weaponname on WeaponIndex. Don't overcomplicate things.
|
| All times are GMT -4. The time now is 12:24. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.