Whenever I try to use this plugin I always crash to the desktop with no error log and no indication of what is wrong.
Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fun>
#define PLUGIN "ZP Weapon Drop Damage"
#define VERSION "1.0"
#define AUTHOR "noob cannon lol"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("drop","handle_drop");
}
public handle_drop(id) {
new targetid, body
if (get_user_aiming(id, targetid, body) <= 100.0)
{
if(is_valid_ent(targetid) && is_user_connected(targetid))
{
if(is_user_alive(targetid))
{
emit_sound(targetid, CHAN_WEAPON, "sound/punch.wav", 1.5, ATTN_NORM, 0, PITCH_NORM );
set_user_health(targetid, get_user_health(targetid) - 20)
}
}
}
return PLUGIN_CONTINUE
}
Perhaps someone knows the error in this?