Hello, here's the code
Code:
#include <amxmodx>
#include <hamsandwich>
new g_plStatsMe[33][4]
public plugin_init()
{
register_plugin("The Players Stats", "1.5", "Sutar")
RegisterHam(Ham_TakeDamage, "player", "cmdDamage", 0)
//register_event("DeathMsg", "cmdDeath", "a")
//register_clcmd("say /me", "sayMeAttacker")
//register_clcmd("say /hp", "sayHpVictim")
//register_event("ResetHUD", "eventResetHud", "be")
}
public cmdDamage(victim, inflictor, attacker, Float:dmg, damagebits)
{
if(victim != attacker && victim != 0 && attacker != 0 && victim < 33 && attacker < 33)
{
if(get_user_team(victim) == get_user_team(attacker))
return HAM_SUPERCEDE
new damage = floatround(dmg, floatround_floor);
if(damage > get_user_health(victim))
damage = get_user_health(victim);
g_plStatsMe[attacker][0] += 1;
g_plStatsMe[attacker][1] += damage;
if(damagebits == (1 << 24))
g_plStatsMe[attacker][2] += damage;
else if(get_user_weapon(attacker) == CSW_KNIFE)
g_plStatsMe[attacker][3] += damage;
}
return HAM_IGNORED
}
the problem is that on the same server it is running. And on the other is not.
just function "cmdDamage" is not satisfied
If you check on the
Windows, Everything works.
if
Linux - does not work.
what went wrong?
Meta list (Linux)
Code:
Currently loaded plugins:
description stat pend file vers src load unlod
[ 1] AMX Mod X RUN - amxmodx_mm_i386. v1.8.1.3 ini Start ANY
[ 2] dproto_EF RUN - dproto_i386.so v0.9.364 ini Start Never
[ 3] MySQL RUN - mysql_amxx_i386. v1.8.1.3 pl1 ANY ANY
[ 4] Fun RUN - fun_amxx_i386.so v1.8.1.3 pl1 ANY ANY
[ 5] FakeMeta RUN - fakemeta_amxx_i3 v1.8.1.3 pl1 ANY ANY
[ 6] CStrike RUN - cstrike_amxx_i38 v1.8.1.3 pl1 ANY ANY
[ 7] Ham Sandwich RUN - hamsandwich_amxx v1.8.1.3 pl1 ANY ANY
7 plugins, 7 running