View Single Post
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 11-08-2019 , 13:17   Re: Best CT & T of the round. [BAD LOAD], help.
Reply With Quote #10

Well first of all there's this in the damage event:

Code:
if(get_user_team(iVictim) != get_user_team(iAttacker))     return HAM_IGNORED

So the plugin will only work if you damage your teammates.

Next, we have this genius thing that adds the damage to both teams without checking who is T and who CT:

Code:
g_fDamagect[iAttacker] += fDamage g_fDamagete[iAttacker] += fDamage

Then, we have the "Get_Best_CT" and "Get_Best_T" functions that both loop all players, again without checking their team.

Code:
for (new i = 1; i <= get_member_game(m_nMaxPlayers); i++)     {         if (!is_user_connected(i))             continue                 if (g_fDamagect[i] > fTemp)         {             fTemp = g_fDamagect[i]             g_iBestCtIndex = i         }     }

So, basically, the author of this plugin had no idea what he is doing and the entire code is garbage.
__________________

Last edited by OciXCrom; 11-08-2019 at 13:18.
OciXCrom is offline
Send a message via Skype™ to OciXCrom