(22-03-2020, 22:45)XaRex Adlı Kullanıcıdan Alıntı:sarkı calmıyorTekrar bi bakPHP Kod:/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "XaRex"
#define TASK_SARKI 27089
new const Sarkilar[][] = {
"player/bhit_helmet-1.wav"
}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn, "player", "Ham_PlayerSpawnedPost", 1)
register_event("DeathMsg", "Event_Death", "a")
}
public client_connect(id) remove_task(id+TASK_SARKI)
public plugin_precache()
{
for(new i = 0; i < sizeof Sarkilar; i++)
precache_sound(Sarkilar[i])
}
public Ham_PlayerSpawnedPost(id)
{
if(!is_user_connected(id))
return PLUGIN_CONTINUE;
remove_task(id+TASK_SARKI)
set_task(5.0, "SoundStop", id+TASK_SARKI)
return PLUGIN_CONTINUE;
}
public SoundStop(id)
{
if(!is_user_connected(id))
return PLUGIN_CONTINUE;
ambience_sound_stop(id)
remove_task(id+TASK_SARKI)
return PLUGIN_CONTINUE;
}
public Event_Death()
{
static Victim, sarki;
Victim = read_data(2)
if(!is_user_connected(Victim))
return PLUGIN_CONTINUE;
sarki = random_num(0, sizeof Sarkilar - 1)
remove_task(Victim+TASK_SARKI)
PlaySound(Victim, Sarkilar[sarki])
remove_task(Victim+TASK_SARKI)
return PLUGIN_CONTINUE;
}
PlaySound(id, const sound[])
{
if (equal(sound[strlen(sound)-4], ".mp3"))
client_cmd(id, "mp3 play ^"sound/%s^"", sound)
else
client_cmd(id, "spk ^"%s^"", sound)
}
ambience_sound_stop(id)
{
client_cmd(id, "mp3 stop; stopsound")
}
Konu
PHP Kod:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "XaRex"
#define TASK_SARKI 27089
new const Sarkilar[][] = {
"zombie_mode/ze/zombies_coming_2.wav"
}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn, "player", "Ham_PlayerSpawnedPost", 1)
register_event("DeathMsg", "Event_Death", "a")
}
public client_connect(id) remove_task(id+TASK_SARKI)
public plugin_precache()
{
for(new i = 0; i < sizeof Sarkilar; i++)
precache_sound(Sarkilar[i])
}
public Ham_PlayerSpawnedPost(id)
{
if(!is_user_connected(id))
return PLUGIN_CONTINUE;
remove_task(id+TASK_SARKI)
set_task(5.0, "SoundStop", id+TASK_SARKI)
return PLUGIN_CONTINUE;
}
public SoundStop(id)
{
if(!is_user_connected(id))
return PLUGIN_CONTINUE;
ambience_sound_stop(id)
remove_task(id+TASK_SARKI)
return PLUGIN_CONTINUE;
}
public Event_Death()
{
static Victim, sarki;
Victim = read_data(2)
if(!is_user_connected(Victim))
return PLUGIN_CONTINUE;
sarki = random_num(0, sizeof Sarkilar - 1)
remove_task(Victim+TASK_SARKI)
PlaySound(Victim, Sarkilar[sarki])
return PLUGIN_CONTINUE;
}
PlaySound(id, const sound[])
{
if (equal(sound[strlen(sound)-4], ".mp3"))
client_cmd(id, "mp3 play ^"sound/%s^"", sound)
else
client_cmd(id, "spk ^"%s^"", sound)
}
ambience_sound_stop(id)
{
client_cmd(id, "mp3 stop; stopsound")
}
Benzer Konular
Yorum
9.187
Okunma
01-01-2025, 16:37
Yorum
11.307
Okunma
05-11-2024, 12:57
)

