Raised This Month: $ Target: $400
 0% 

+mycommand?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BioHazardousWaste
Senior Member
Join Date: Apr 2005
Location: Ontario, Canada =)
Old 04-24-2005 , 23:52   +mycommand?
Reply With Quote #1

Um... v3x mentioned this to me, and it sounds like I could really use it. How do you have something happen while the button is held down, but when released it is stopped? Thanx
__________________
"What then is truth? Truths are illusions which we have forgotten are illusions - they are metaphors that have become worn out... this (truth) is the duty to lie according to a fixed convention.

-Friedrich Nietzsche
BioHazardousWaste is offline
Send a message via MSN to BioHazardousWaste
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 04-25-2005 , 09:05  
Reply With Quote #2

Code:
public plugin_init() {     register_clcmd( "+my_command", "ClCmd_Hold",    -1, "" )     register_clcmd( "-my_command",  "ClCmd_Release", -1, "" )     } public ClCmd_Hold( id ) {     // user is holding key down } public ClCmd_Release( id ) {     // user released button }

The beauty of this is that, you only have to bind the + command, and when you let go of the button, HL automatically calls the - command for you..

I hope that helps..
xeroblood is offline
Send a message via MSN to xeroblood
BioHazardousWaste
Senior Member
Join Date: Apr 2005
Location: Ontario, Canada =)
Old 04-25-2005 , 15:49  
Reply With Quote #3

Perfect... thanx
__________________
"What then is truth? Truths are illusions which we have forgotten are illusions - they are metaphors that have become worn out... this (truth) is the duty to lie according to a fixed convention.

-Friedrich Nietzsche
BioHazardousWaste is offline
Send a message via MSN to BioHazardousWaste
Reply



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 16:37.


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