Talk:Adding a Weapon Drop System
I think it strange method of realization o_0 It may be a little easier if you just make a console command for drop function and no button definition will be needed. Also current code needs to check some player conditions as example if player in vehicle or iron-sight mode enabled or not (if it implemented), and check for availability (can player drop this weapon or not). --Light_Kill 11:52, 10 October 2012 (PDT)
Hello Light_Kill, thank you for writing this down.
Indeed, you are right that the function call was not well made in terms to say that there were no condition checks. I managed to add a few conditions in the call sequence and added a new ConVar at your request. The tutorial has been updated. Thank you. - malortie.
Hi malortie, i glad to see updates of this page :D
The ConVar addition is really useful for some mods. I will try to improve this article to check more conditions. --Light_Kill 05:22, 15 October 2012 (PDT)
Remove IN_Buttons functionality
That is completely unnecessary and just lowers the limit of the available IN_Buttons for future, yes I am aware that people who will reach the button limit, will do it themselves properly, but it's still a better idea to do it properly in the tutorial too.
I've had been in a situation where I capped the button limit, so I know how painful it is to do workarounds later. --Ratchet 14:02, 3 December 2012 (PST)
Testing for the player, and the player being in a vehicle broke the script.
I tried removing both of those, and the script worked without a hitch. the UTIL mentioned on the page (UTIL_GetCommandClient) may be broken, as the command would only be run when the console was closed. I will remove these, and if anyone has questions please respond to this thread. Thanks! --BlockBuilder57 (talk) 02:11, 22 January 2017 (UTC)
PS: The article also seems a bit demanding of the viewer? Why is that? "You shall open up 'hl2_player.cpp' and 'hl2_player.h'" sounds a little harsh.