View Single Post
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 04-06-2012 , 13:19   Re: [Any] Prevent Fast Ladder Climb
Reply With Quote #3

Quote:
Originally Posted by thetwistedpanda View Post
PHP Code:
public ConVarChange_On(Handle:convar, const String:oldValue[], const String:newValue[])
{
    
g_bOn GetConVarBoolg_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.
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work

Last edited by RedSword; 04-06-2012 at 14:16.
RedSword is offline