I want to make a plugin that if we walk there is a shake effect on the weapon model.. is it right?
Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <engine>
#define PLUGIN "UnKnown."
#define VERSION "1.0"
#define AUTHOR ""
public plugin_init()
{
register_plugin("run effect","1.0","SubFive")
register_clcmd("bind "s","cmd_run",ADMIN_USER)
}
public WALKMOVE_NORMAL(id)
{
{
set_animation(id, 7)
set_task(1.2, "revert_back", id)
}
}
public revert_back(id)
{
client_cmd(id, "lastinv")
}
public set_animation( id, seq )
{
entity_set_int(id, EV_INT_weaponanim, seq);
message_begin(MSG_ONE, SVC_WEAPONANIM, {0,0,0}, id);
write_byte(seq);
write_byte(entity_get_int(id, EV_INT_body));
message_end();
}