Raised This Month: $ Target: $400
 0% 

Optimizing question.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 12-03-2010 , 13:06   Optimizing question.
Reply With Quote #1

I have to hook the use of a single func_button, depending on the targetname.
It is possible that the button doesn't exist though.
So i was wondering what's the best way to hook it.

1. Hook Ham_Use and check if it's the right button there.
2. Loop through all entities at plugin_init() and use RegisterHamFromEntity.


Ofcourse you can post another method if it's better then my 2 idea's.


EDIT: And if i hook the button in pre and return HAM_SUPERCEDE, will that block the button to activate the stuff that it's supposed to do ?
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.

Last edited by drekes; 12-03-2010 at 13:09.
drekes is offline
Send a message via MSN to drekes
 


Thread Tools
Display Modes

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 11:18.


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