So ... Here's what am trying to do :
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#define PLUGIN "Test"
#define VERSION "1.0"
#define AUTHOR "Epic"
new TestPlayer;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_TakeDamage, "player", "Fw_TakeDamage")
register_clcmd("say /test", "Test")
}
public Test(id)
{
TestPlayer = id
}
public Fw_TakeDamage(victim, inflictor, attacker, Float:damage, damagetype)
{
if(attacker == TestPlayer)
{
client_print(0, print_chat, "Attacker is a test player")
}
else if(attacker != TestPlayer)
{
client_print(0, print_chat, "Attacker is not test player")
}
}
here's the problem , when i attack a player , it doesnt print a message , but when another play attack me , it shows that Attacker is not a test player.
Any help would be appreciated , even a hint would be appreciated ...