I just want to get active For T team
I do not know how to use this command;
PHP Code:
if(cs_get_user_team(id) == CS_TEAM_T)
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Alka"
#define STEP_DELAY 4.5
new Float:g_fNextStep[33];
#define MAX_SOUNDS 4 //Max num of sound for list below
new const g_szStepSound[MAX_SOUNDS][] = {
"zombie_plague/zombie_madness1.wav",
"zombie_plague/zombie_burn5.wav",
"zombie_plague/zombie_madness1.wav",
"zombie_plague/zombie_burn5.wav"
};
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_forward(FM_PlayerPreThink, "fwd_PlayerPreThink", 0);
}
public plugin_precache()
{
new i;
for(i = 0; i < MAX_SOUNDS ; i++)
precache_sound(g_szStepSound[i]);
}
public fwd_PlayerPreThink(id)
{
if(!is_user_alive(id))
return FMRES_IGNORED;
set_pev(id, pev_flTimeStepSound, 999);
if(g_fNextStep[id] < get_gametime())
{
if(fm_get_ent_speed(id) && (pev(id, pev_flags) & FL_ONGROUND))
emit_sound(id, CHAN_BODY, g_szStepSound[random(MAX_SOUNDS)], VOL_NORM, ATTN_STATIC, 0, PITCH_NORM);
g_fNextStep[id] = get_gametime() + STEP_DELAY;
}
return FMRES_IGNORED;
}
stock Float:fm_get_ent_speed(id)
{
if(!pev_valid(id))
return 0.0;
static Float:vVelocity[3];
pev(id, pev_velocity, vVelocity);
vVelocity[2] = 0.0;
return vector_length(vVelocity);
}
__________________