csgo daki gibi ayak sesı degıstıren bır plugın varmı acaba?
Union CSGO Mode
#include <amxmodx>
#include <fakemeta>
#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Alka"
#define STEP_DELAY 0.5
new Float:g_fNextStep[33];
#define MAX_SOUNDS 4 //Max num of sound for list below
new const g_szStepSound[MAX_SOUNDS][] = {
"custom_step_sound#1.wav",
"custom_step_sound#2.wav",
"custom_step_sound#3.wav",
"custom_step_sound#4.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);
}
Konu ile Alakalı Benzer Konular | |||||
Konular | Yazar | Yorumlar | Okunma | Son Yorum | |
(istek) İsim Başında Server Tagı | arascandan | 4 | 462 |
12-12-2019, Saat: 21:30 Son Yorum: By.KinG |
|
Eklenti istek | cebo00 | 5 | 509 |
10-12-2019, Saat: 19:29 Son Yorum: By.KinG |
|
Yasaklı kelime eklentisi istek | faca61* | 3 | 389 |
10-12-2019, Saat: 19:29 Son Yorum: By.KinG |
|
Istek slotlara ozel para | KONYALI | 2 | 372 |
01-12-2019, Saat: 15:34 Son Yorum: By.KinG |
|
Otomatik map değişimi istek plugini | caner5706 | 2 | 408 |
28-11-2019, Saat: 20:22 Son Yorum: By.KinG |