PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <engine_stocks>
#define IN_RUN (1<<12)
RegisterHam(Ham_Weapon_SendWeaponAnim,"weapon_mp5","walk");
}
public walk( id )
{
if (get_user_button(id) & IN_RUN)
{
SendWeaponAnim( id, 7 );
}
set_task(2.0, "walk", id)
}
SendWeaponAnim( id, run ) //SendWeaponAnim( id, animation )
{
set_pev( id, "weapon_mp5", 7 ); //set_pev( id, pev_weaponanim, animation );
message_begin( MSG_ONE_UNRELIABLE, SVC_WEAPONANIM, .player = id );
write_byte( run );
write_byte( pev( id, 7 ) ); //write_byte( pev( id, pev_body ) );
message_end();
}
Got some errors
Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
Error: Undefined symbol "set_pev" on line 28
Error: Undefined symbol "pev" on line 32
2 Errors.
Could not locate output file C:\Program Files\AMX Mod X\amxxstudio\Untitled.amx (compile failed).