|
Author
|
Message
|
|
Senior Member
|

06-26-2007
, 09:07
Re: How to get The Key Down And Up Event
|
#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");
}
}
__________________
_____________________________________________
|
|
|
|