Detect +USE key
is there a way to detect if the +USE "e" key is press in the plugin_init()?
what i want to do is, have a function called if anyone press the use key. Is there are way to do this in the init with an event or do i have to do it through client_PreThink? It is only used to trigger my function so i dont need to know if its held and it isnt going to be pressed over and over, so i dont want it to be check excessively. thanks |
Re: Detect +USE key
PHP Code:
|
Re: Detect +USE key
plugin_init() is called when the plugin is initiallyzed, so no players on server then ! lol...
|
Re: Detect +USE key
Quote:
register_forward( FM_CmdStart, "CmdStart" ) Code:
|
Re: Detect +USE key
ohhh, thanks Orangutanz, exactly what i needed
|
Re: Detect +USE key
k now, big question
FM_PreThink Vs. FM_CmdStart Whats the diff? You can use both right? But when does FM_CmdStart get called compaired to PreThink ( All the time before you do something ) |
Re: Detect +USE key
Fm_CmdStart is called when a command is issued by player.
PreThink is called on every player frame, that means MANY times per second. Code:
UserCmd Constants |
Re: Detect +USE key
wow so my shove mod uses bad practices.. I should update this to FM_CmdStart
Thanks |
Re: Detect +USE key
Quote:
|
Re: Detect +USE key
Quote:
|
| All times are GMT -4. The time now is 01:13. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.