so im using this to increase the damage of the knife on my server
for some reason i always get in logs error native for the first parameter in the if statement
for example:
in this case i get native error get_user_weapon
Code:
if( get_user_weapon(attacker) == CSW_KNIFE && !zp_core_is_zombie(attacker))
in this case i get error native zp_core_is_zombie
Code:
if( !zp_core_is_zombie(attacker) && get_user_weapon(attacker) == CSW_KNIFE)
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <engine>
#include <hamsandwich>
#include <zp50_core>
#define PLUGIN "[ADN] Axe"
#define VERSION "1.0"
#define AUTHOR "ADN"
new cvar_human_axe_damage1, cvar_human_axe_damage2
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
cvar_human_axe_damage1 = register_cvar("zp_human_axe_damage1", "100.0")
cvar_human_axe_damage2 = register_cvar("zp_human_axe_damage2", "400.0")
// Add your code here...
}
public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)
{
if( get_user_weapon(attacker) == CSW_KNIFE && !zp_core_is_zombie(attacker))
{
new button = get_user_button(attacker)
if((button & IN_ATTACK) && !(button & IN_ATTACK2))
{
SetHamParamFloat(4, get_pcvar_float(cvar_human_axe_damage1))
}
if((button & IN_ATTACK2) && !(button & IN_ATTACK))
{
SetHamParamFloat(4, get_pcvar_float(cvar_human_axe_damage2))
}
}
}