PHP Code:
if (!IsFakeClient(tank) && !g_hOdinsHuman.BoolValue)
Flip these checks around, more optimized.
PHP Code:
if (IsTank(tank))
target = GetClientAimTarget(tank);
You already have the "IsTank" check above which will return if not. Again you have several "IsTank" checks below, these are not needed.
PHP Code:
if (!IsTankRock(inflictor)) return Plugin_Continue;
damage = g_hOdinsTrick.FloatValue;
if (!IsTank(attacker)) return Plugin_Continue;
Put the two checks together, assigning a value that maybe never used is not optimized.
PHP Code:
for (int i = 1; i < MaxClients; i++)
All loops like this should be: i <= MaxClients
PHP Code:
char classname[MAX_NAME_LENGTH];
You assign a random length, this is player name length not the targetname length. Then you're only checking a string that is 9 chars long, so you should set as "char classname[10]" and I would even set as "static char classname[10]" so it doesn't create the string each time, since you're filling it with data before reading ever reading it.
PHP Code:
SDKHook(target, SDKHook_OnTakeDamage, OnTakeDamage);
You will be hooking the same target multiple times on multiple throws. You never remove the damage hook. I suggest removing the hook in the post forward "L4D_TankRock_OnRelease_Post".
__________________