#include <amxmodx>
#include <fakemeta>
new g_bTurnAround[MAX_PLAYERS + 1];
public plugin_init()
{
register_forward(FM_UpdateClientData, "fw_UpDateClientData_Post", true);
register_clcmd("say /test", "clcmd_test");
}
public clcmd_test(id)
{
g_bTurnAround[id] = !g_bTurnAround[id];
}
public fw_UpDateClientData_Post(id, iSendWeapons, CD_Handle)
{
if (g_bTurnAround[id]) {
if (is_user_alive(id)) {
static Float:flPunchAngle[3]; pev(id, pev_punchangle, flPunchAngle);
flPunchAngle[1] += 180.0;
set_cd(CD_Handle, CD_PunchAngle, flPunchAngle);
return FMRES_HANDLED;
}
}
return FMRES_IGNORED;
}