Raised This Month: $ Target: $400
 0% 

hamsandwich:: Ham_TakeDamage - does not work


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Sutar
Senior Member
Join Date: Sep 2010
Old 01-20-2014 , 14:29   hamsandwich:: Ham_TakeDamage - does not work
#1

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
Sutar is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:08.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode