PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <engine>
#define VERSION "0.1"
new const SoundHere[ ] = "sound/soundhere.wav";
public plugin_init( )
{
register_plugin( " Footsteps Example ", VERSION, "3Di" );
register_forward( FM_PlayerPreThink, "PlayerThink", 1 );
}
public plugin_precache( )
{
precache_sound( SoundHere );
}
public PlayerThink( id )
{
if( !is_user_alive( id ) )
return PLUGIN_HANDLED;
new CsTeams:CheckTeam = cs_get_user_team( id );
new ButtonId = get_user_button( id );
if( ( ButtonId & IN_FORWARD ) || ( ButtonId & IN_BACK ) || ( ButtonId & IN_MOVELEFT ) || ( ButtonId & IN_MOVERIGHT ) )
{
switch(CheckTeam)
{
case CS_TEAM_T:
{
emit_sound( id, CHAN_ITEM, SoundHere, 1.0, ATTN_NORM, 0, PITCH_HIGH );
}
}
}
return PLUGIN_CONTINUE;
}