PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <cstrike>
#include <engine>
#include <fakemeta>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
public plugin_init()
{
register_plugin("Anim","1.0","SubFive")
register_think("PreThink", "entity_set_int")
}
public client_PreThink(id)
{
entity_set_int(id,EV_INT_button,IN_RUN);
}
public anim(id)
{
if(user_has_weapon(id, CSW_MP5NAVY))
{
engclient_cmd(id, "weapon_mp5")
set_animation(id, 7)
}
}
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();
}
Why the animation doesn't play?