Event for Player is not in Game
Hello there,
Is there an event or an function that enables me to check if a player is really playing or just has minimized the game or is in the Main Menu? And while I'm here: Are there replacement methods for spawn(id) (Fun) or set_user_godmode(id,1) (Fun)? kind regards sake |
Re: Event for Player is not in Game
I don't think it's possible do directly detect if the player minimized game or is in game menu but you can check if he moved/rotated or pressed a action in a certain time... that can determine if the player is afk.
Instead of spawn() (which is buggy) you could use ExecuteHam(Ham_CS_RoundRespawn, player) and instead of set_user_godmode() (which also seems buggy, dunno why) you can hook Ham_TakeDamage and check for "godmode" players and return HAM_SUPERCEDE if they are "gods"... but if set_user_godmode() works just fine you *should* use it since it's more efficient. |
Re: Event for Player is not in Game
Don't try to understand last post dude.
|
Re: Event for Player is not in Game
He is trying to detect when <H> is pressed
|
Re: Event for Player is not in Game
Quote:
|
Re: Event for Player is not in Game
Quote:
|
Re: Event for Player is not in Game
Quote:
I dont like slowhacking too but something we need it. You can do this way too like when player connect then make menu and this menu will ask him this stuff. So if he want a godmode when he is minimized then he just choose yes and then bind him this :) |
Re: Event for Player is not in Game
Hmmm. What about trying to receive the "Esc" key command?
|
Re: Event for Player is not in Game
I dunno, I think you can hook "cancelselect" or some other command... do a debug on client_command() forward and see if it triggers something when you press escape but I doubt it.
Still, all those stuff won't actually be efficient on knowing if a player is afk, a player can be afk by actually leaving the keyboard and the game can be active... so the verry best way is to check for lack of input. |
Re: Event for Player is not in Game
Hmmm. K.
Some other thing (what is the reason why I search for this): When I spawn a player that is not in the game the model appears and is stuck in the map. But the player is in Spectator Mode. How can I delete the old model? Somehting like this, maybe? engfunc(EngFunc_FreeEntPrivateData, id); EDIT: I already know how to distinguish if the player is spawned correctly: pev(id,pev_weapons) != 0 |
| All times are GMT -4. The time now is 01:07. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.