Raised This Month: $ Target: $400
 0% 

hook "buy" command while dead or not in buyzone


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 05-21-2014 , 19:44   hook "buy" command while dead or not in buyzone
Reply With Quote #1

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!
.Dare Devil. is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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