This plugin doesn't work on paintball ( receive HE for kill from HE )
Hello guys
Can someone of You help me, that this plugin will give HE_GRANADE on paintball? Normally, it gives, but on paintball not. Thanks!
Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <fun>
#include <hamsandwich>
#include <colorchat>
#define PLUGIN "Granat"
#define VERSION ""
#define AUTHOR ""
new g_cPrefix;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_TakeDamage, "player", "ham_postTakeDamage", 1);
g_cPrefix = register_cvar("granat_prefix", "Hit4u.eu");
}
public ham_postTakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
new szPrefix[10];
get_pcvar_string(g_cPrefix, szPrefix, charsmax(szPrefix));
if(damagebits == (1<<24) && this != idattacker && get_user_team(this) != get_user_team(idattacker) && damage >= float(get_user_health(this) && is_user_alive(idattacker) && is_user_connected(this)))
{
give_item(idattacker, "weapon_hegrenade");
ColorChat(idattacker, GREEN, "[%s]^x03Otrzymales HE ^x01za zabicie wroga z granatu!", szPrefix);
}
}
|