Equip WEAPON_NONE
Hello
I want to know if there's a way to force the "unequip" of the current weapon (regardless of the player's current equipment). I know there's an index called "WEAPON_NONE" referring to no weapon equipped. Thanks in advance. |
Re: Equip WEAPON_NONE
engfunc_cmd drop weapon_name?
|
Re: Equip WEAPON_NONE
Quote:
|
Re: Equip WEAPON_NONE
Unequip as destroy the item in their inventory?
|
Re: Equip WEAPON_NONE
Just unequip them, setting their current weapon index to 0 maybe? Having no weapon means the player will play its idle animation. The player may select their weapon again to equip it and send a custom client command to unequip it.
|
Re: Equip WEAPON_NONE
Quote:
|
Re: Equip WEAPON_NONE
Quote:
Note that I DONT want to just "hide" the current weapon (hiding the models or something) because the player models will still use the current weapon anims. |
Re: Equip WEAPON_NONE
I made it for you:
PHP Code:
1. Hidding/Adding back weapon by typing in chat /switch 2. Blocking Weapon Pickup (weapon slot block) 3. Hidden_Weapon = 0 - if player is dead, disconnected ,softly connected or got the weapon back. (safety checks) Thats it. Hope it works. P.S. I made /switch because i don't know how are you planning to use it. If you want you can explain and i'll made it to work how it were supposed... |
Re: Equip WEAPON_NONE
and you can try this !
PHP Code:
|
Re: Equip WEAPON_NONE
Sorry but i was thinking and my code it's not enough good.
I mean that it will remove weapon and even if you'll have nothing in hands then if you will change weapon and then change back to primary slot , it won't appear because it will be empty, or not. I don't know , test it. I know that there is an strip stock (fm, ham , engine... i dont know exactly) which strips the gun but it stays red weapon in primary slot and you can select it but nothing appears.It's what you need. If someone knows how to do that then i can add it to my code. |
| All times are GMT -4. The time now is 18:36. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.