Add music join server

Сообщения
31
Реакции
0
Hello i have one problem i found this script in google i use working good. But i have one problem when i join in server or when i try retry working music but just for me not for all players. Do you know somebody where is wrong. Just i need one plugin when connect to start music

Код:
#include amxmodx

new const g_szSound[ ] = "sound/milleniumi.mp3"; 

public plugin_precache( ) 
{   
    precache_generic(g_szSound); 
} 

public client_putinserver(id)
{
    set_task(1.0, "play", id) 
} 

public play(id) 
{ 
    if(is_user_bot(id)) 
        return;
    
    if(is_user_connected(id)) 
    {
        client_cmd(id, "mp3 play ^"%s^"", g_szSound); 
    }
}
 
Сообщения
964
Реакции
51
Помог
10 раз(а)
trendafili,
Код:
-client_cmd(id, "mp3 play ^"%s^"", g_szSound);
+client_cmd(0, "mp3 play ^"%s^"", g_szSound);
And do the check for the bot before set_task.
 
Последнее редактирование:
Сообщения
31
Реакции
0
trendafili,
Код:
-client_cmd(id, "mp3 play ^"%s^"", g_szSound);
+client_cmd(0, "mp3 play ^"%s^"", g_szSound);
And do the check for the bot before set_task.
Thanks for your answered, i want this sound to working individual if i connect or if i make retyr sound to working for me not when i join in server music to start for all players.
 

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу