Quote:
Originally Posted by thetwistedpanda
PHP Code:
public ConVarChange_On(Handle:convar, const String:oldValue[], const String:newValue[]) { g_bOn = GetConVarBool( g_on ); }
should be:
PHP Code:
public ConVarChange_On(Handle:convar, const String:oldValue[], const String:newValue[]) { g_bOn = StringToInt(newValue) ? true : false; }
And since OnPlayerRunCmd runs quite often, you should consider optimizing the plugin and caching a player's IsPlayerAlive and IsFakeClient into boolean variables.
|
Good idea !
I understand how I should cache IsPlayerAlive (spawn/death); but IsFakeClient ? Would only checking that on player_connect be enough; when is a player considered a bot or not :/ (testing it currently)?
Thanks,
Red
EDIT : Anyway to hook OnMoveTypeChange or something like xD ?
RE-EDIT : 1.0.1 is out; did the optimization; I doubt I could optimize more at this point.
__________________