Simple use the
user_slap comand and set the power to 1
Your Plugin with user_slap:
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
public plugin_init()
{
register_plugin("Say Lol And Get Slapped", "1.0", "eXec")
register_concmd("say lol", "lol")
register_cvar("slaplol_on", "1")
}
public func_gethp(id)
{
if(get_cvar_num("slaplol_on") == 0)
{
return PLUGIN_HANDLED
}
else
{
user_slap(id,1,rnddir=1)
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}
that will slap the player and subtract 1 point of damage from their health
__________________