Проблема с сигнальной Тревогой
#1

Подскажите как сделать чтоб сирена была слышна всем в радиусе 300

PHP Code:
case D_SIRENA:
                {
                if(
response)
                        {
              
PlayAudioStreamForPlayer(playerid"http://d.zaix.ru/8yzi.mp3",-1142.7397,-987.3260,129.26303001);
              
SendClientMessage(playeridCOLOR_SYSTEM, !"Сигнальная тревога включена");
                        }
                } 
PHP Code:
case D_SIRENA1:
                {
                if(
response)
                        {
              
StopAudioStreamForPlayer(playerid);
              
SendClientMessage(playeridCOLOR_SYSTEM, !"Сигнальная тревога выключена");
                        }
                } 
Reply
#2

Dell (Не так понял вопрос)
Reply
#3

PHP Code:
case D_SIRENA
                { 
                if(
response
                        { 
                            for(new 
ii<MAX_PLAYERSi++)
                            {
                                          if(!
IsPlayerConnected(i)) continue;
                                          
PlayAudioStreamForPlayer(i"http://d.zaix.ru/8yzi.mp3",-1142.7397,-987.3260,129.26303001); 
                             }
                            
SendClientMessage(playeridCOLOR_SYSTEM, !"Сигнальная тревога включена"); 
                        } 
                } 
Reply
#4

pawn Code:
case D_SIRENA:
{
    if(!response) return 1;
    for(new i = GetPlayerPoolSize(); i >= 0; i--)
    {
        PlayAudioStreamForPlayer(i, "http://d.zaix.ru/8yzi.mp3", -1142.7397, -987.3260, 129.2630, 300.0, 1);
        SetPVarInt(i, !"AlarmTone", 1); // вдруг какой-то другой поток будет проигрываться
    }
    SendClientMessage(playerid, COLOR_SYSTEM, !"Сигнальная тревога включена");
    return 1;
}
case D_SIRENA1:
{
    if(!response) return 1;
    for(new i = GetPlayerPoolSize(); i >= 0; i--)
    {
        if(!GetPVarInt(i, !"AlarmTone")) continue;
        StopAudioStreamForPlayer(i);
        DeletePVar(i, !"AlarmTone");
    }
    SendClientMessage(playerid, COLOR_SYSTEM, !"Сигнальная тревога выключена");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)