Raised This Month: $ Target: $400
 0% 

How to get The Key Down And Up Event


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
spider853
Senior Member
Join Date: Jul 2006
Old 06-26-2007 , 09:07   Re: How to get The Key Down And Up Event
Reply With Quote #1

BIG THX TO ALL FOR HELP... thx Greenberet

but i how to get rid of that warning message

Warning: Loose indentation on line 15

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
// Add your code here...
register_forward(FM_PlayerPreThink, "prethink",0) //LINE 15 (WARNING)
}
public prethink( id )
{
static button,oldbuttons;
button = pev( id, pev_button );
oldbuttons = pev( id, pev_oldbuttons );
if(button & IN_USE && !(oldbuttons & IN_USE))
{
console_print(id,"USE DOWN");
} else if( oldbuttons & IN_USE && !(button & IN_USE))
{
console_print(id,"USE UP");
}
}
__________________
_____________________________________________
spider853 is offline
Send a message via ICQ to spider853
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 21:30.


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