I think you're wrong here :
Code:
public FM_PlayerPreThink(id)
{
if(g_footstep_set[id])
set_pev(id, pev_flTimeStepSound, 999);
}
Should be 999.0 or 999.9 whatever but a float.
I would do :
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#define MAX_PLAYERS 32
new bool:g_bNoFootSteps[MAX_PLAYERS+1]
new bool:g_bAlive[MAX_PLAYERS+1]
public plugin_init()
{
RegisterHam(Ham_Spawn, "player", "Player_Spawn", 1)
RegisterHam(Ham_Killed, "player", "Player_Killed", 1)
RegisterHam(Ham_Player_PreThink, "player", "Player_PreThink")
register_clcmd("say /footsteps", "Cmd_FootSteps")
}
public client_putinserver(id)
{
g_bNoFootSteps[id] = false
}
public Player_Spawn(id)
{
g_bAlive[id] = bool:is_user_alive[id]
//g_bNoFootSteps[id] = false
}
public Player_Killed(id)
{
g_bAlive[id] = bool:is_user_alive[id]
}
public Player_PreThink(id)
{
if(g_bAlive[id] && g_bNoFootSteps[id])
set_pev(id, pev_flTimeStepSound, 999.0)
}
public Cmd_FootSteps(id)
{
g_bNoFootSteps[id] = !g_bNoFootSteps[id]
client_print(id, print_chat, "Your footsteps are %ssilenced.", g_bNoFootSteps[id] ? "" : "not ")
}
__________________