Hooking weapon remove
How to hook when some specified weapon( i.e. galil ) is removed from players inventory, in this case I need when player drops weapon ? I tried to use Ham_Item_Kill, but it seems that it isnt called in this situation. :?
|
Re: Hooking weapon remove
Drop by command ? death ?
|
Re: Hooking weapon remove
Quote:
|
Re: Hooking weapon remove
Simply hook "drop"
|
Re: Hooking weapon remove
Quote:
|
Re: Hooking weapon remove
Quote:
It makes it uselessly inefficient because hooking "drop" is all that is needed. |
Re: Hooking weapon remove
Quote:
|
Re: Hooking weapon remove
Well, for sure, it would be more complicated, because "drop" command calls CBasePlayer:: DropPlayerItem() but this function is used in severals others functions, so using orpheu you would need either to filter the functions, either to hook ClientCommand() and filter the arguments. At the end, hooking "drop" is the simplest way and fits perfectly to the need here. ;)
|
Re: Hooking weapon remove
Quote:
|
Re: Hooking weapon remove
If a plugin blocks the "drop" command using PLUGIN_HANDLED (instead of PLUGIN_MAIN_HANDLED), it means it's the plugin which is badly coded and that's not my fault. :p . Well, if you are crazy, you could still hook directly amxx with orpheu. ;)
|
All times are GMT -4. The time now is 19:55. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.