View Single Post
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-27-2010 , 18:58   Re: Is it possible to hook the grenade explode event?
Reply With Quote #7

1. You can't use get_user_origin() with a non-player entity.
2. Cache get_maxplayers() in a global variable and retrieve the value on plugin_init().
3. Player indexes are from 1->maxplayers, not 0->(maxplayers - 1).
4. No need to check is_user_connected() since is_user_alive() checks if player is connected.
5. Don't create variables inside loops.
6. Cache the radius at the top of the function so you don't retrieve it for every player.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline