AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   hook "buy" command while dead or not in buyzone (https://forums.alliedmods.net/showthread.php?t=240754)

.Dare Devil. 05-21-2014 19:44

hook "buy" command while dead or not in buyzone
 
Hello!

Since the zombieplague dont use "buy" command we have an empty button "B" :)
I was planning to use that button for extra things like choosing ammo type for weapon or nade type what ever. After registering simple buy hook commands
PHP Code:

register_clcmd("buy""extra_key_hook")
register_clcmd("client_buy_open""extra_key_hook"

I saw that after pressing b, my function were not called.
After reading here in scripting help i saw that you have to be in buyzone in order to this thing to work.
My first idea was, what hell lets spawn info_map_parameters and make the buyzone everywhere but then i thought, what happens when im dead? (also) :)
Yea so this idea wont work because i need to hook that even when im dead.

Does anyone have any idea how to mess with things in order to "buy" command work anytime?
( since i dont need that buymenu itself i just client_cmd( id, "slot10" ) to force menu close quickly )

Thanks!


All times are GMT -4. The time now is 09:47.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.