Hey.Sry for my bad en. I wont sounds when user is disconnected, but i wont sounds if he was on stats list TAB PRESS [no he dowload my server files and disconnected, but play on my server and disconnected] Help me PLZ this is my plug-in:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <fun>
#define PLUGIN "LeAvE SoUnDs"
#define VERSION "0.1"
#define AUTHOR "sQn"
#define MIN_LEAVE 0.1
#define MAX_LEAVE 6.0
new wital[33]
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("ResetHUD", "leave_event", "be")
}
public plugin_precache()
{
precache_sound("FtF/konczyc.wav")
precache_sound("FtF/naraska.wav")
precache_sound("FtF/3maj.wav")
precache_sound("FtF/cya.wav")
precache_sound("FtF/narka.wav")
precache_sound("FtF/elo.wav")
}
public client_putinserver( id )
{
wital[id] = 1
}
public client_disconnect( id )
{
wital[id] = 0
}
public client_connect( id )
{
wital[id] = 1
}
public leave_event(id)
{
if(!(wital[id] == 0))
{
set_task(random_float(MIN_LEAVE, MAX_LEAVE),"greetings",id)
wital[id] = 0
}
}
public greetings( id )
{
if (!(wital[id] == 0))
{
wital[id] = 0
new randomizer[33]
randomizer[id] = (random_num(1,6))
if(randomizer[id] == 1)
{
emit_sound(id, CHAN_AUTO, "FtF/konczyc.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
}
else if(randomizer[id] == 2)
{
emit_sound(id, CHAN_AUTO, "FtF/naraska.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
}
else if(randomizer[id] == 3)
{
emit_sound(id, CHAN_AUTO, "FtF/3maj.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
}
else if(randomizer[id] == 4)
{
emit_sound(id, CHAN_AUTO, "FtF/cya.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
}
else if(randomizer[id] == 5)
{
emit_sound(id, CHAN_AUTO, "FtF/narka.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
}
else if(randomizer[id] == 6)
{
emit_sound(id, CHAN_AUTO, "FtF/elo.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
}
}
return PLUGIN_HANDLED
}
__________________
80.52.244.150:27016
|