Онлайн радио в машине - Форум Cheat-Master.ru
  • Страница 1 из 1
  • 1
Модератор форума: Phoenixxx_Czar, Getbackthere, [CM]OlegEhtler  
Онлайн радио в машине
Klasnaya Дата: Суббота, 05.07.2014, 22:54 | Сообщение # 1
Боец
Сообщений: 223
Статус: Offline
Показываю версию радио в машине
Врубается автоматически
Работает на основе стримера PlayAudioStreamerForPlayer
1. ко всем new
Код
new Radiostation[MAX_VEHICLES];//радио в машине

2. в public OnGameModInit
Код
for(new v; v < MAX_VEHICLES; v++)Radiostation[v] = random(14);//Радиостанции

3. в public OnPlayerStateChange
Код
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
     {
        new veh = GetPlayerVehicleID(playerid);
        switch(Radiostation[veh])
        {
           case 0: return 1;
           case 1: {GameTextForPlayer(playerid,"Europa plus",3000,5);PlayAudioStreamForPlayer(playerid,"http://webcast.emg.fm:55655/europaplus128.mp3");}
           case 2: {GameTextForPlayer(playerid,"Maks FM",3000,5);PlayAudioStreamForPlayer(playerid,"http://radio.maks-fm.ru:8000/maksfm128.m3u");}
           case 3: {GameTextForPlayer(playerid,"ICE FM",3000,5);PlayAudioStreamForPlayer(playerid,"http://icefm.ru/etc/live.m3u");}
           case 4: {GameTextForPlayer(playerid,"Vesti FM",3000,5);PlayAudioStreamForPlayer(playerid,"http://audio.rambler.ru/play.html?id=2537099");}
           case 5: {GameTextForPlayer(playerid,"Russian Radio",3000,5);PlayAudioStreamForPlayer(playerid,"http://radio01-cn03.akadostream.ru:8000/russianradio128.mp3");}
           case 6: {GameTextForPlayer(playerid,"Mayak Radio",3000,5);PlayAudioStreamForPlayer(playerid,"http://radio01-cn03.akadostream.ru:8000/mayak128.mp3");}
           case 7: {GameTextForPlayer(playerid,"Nashe Radio",3000,5);PlayAudioStreamForPlayer(playerid,"http://188.127.243.169:80/nashe-192");}
           case 8: {GameTextForPlayer(playerid,"Retro FM",3000,5);PlayAudioStreamForPlayer(playerid,"http://radio01-cn03.akadostream.ru:8000/radioretro128.mp3");}
           case 9: {GameTextForPlayer(playerid,"Radio Shanson",3000,5);PlayAudioStreamForPlayer(playerid,"http://radio02-cn03.akadostream.ru:8108/shanson128.mp3");}
           case 10: {GameTextForPlayer(playerid,"Nashi Pesni",3000,5);PlayAudioStreamForPlayer(playerid,"http://online.nashipesni.ru:8000/nashipesni");}
           case 11: {GameTextForPlayer(playerid,"D-fm",3000,5);PlayAudioStreamForPlayer(playerid,"http://santa-rossa.ru/Vse_dly_samp/dfm.m3u");}
           case 12: {GameTextForPlayer(playerid,"Ultra",3000,5);PlayAudioStreamForPlayer(playerid,"http://santa-rossa.ru/Vse_dly_samp/radio_ultra_192.m3u");}
           case 13: {GameTextForPlayer(playerid,"Nashe Radio",3000,5);PlayAudioStreamForPlayer(playerid,"http://santa-rossa.ru/Vse_dly_samp/nashe-192.m3u");}
           case 14: {GameTextForPlayer(playerid,"Full-On",3000,5);PlayAudioStreamForPlayer(playerid,"http://santa-rossa.ru/Vse_dly_samp/full-on.m3u");}
        }
     }
else if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)StopAudioStreamForPlayer(playerid);

4. в public OnPlayerCommandText
if (strcmp("/nextradio", cmdtext, true, 10) == 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new veh = GetPlayerVehicleID(playerid);
if(Radiostation[veh] != 10)Radiostation[veh] ++;
else Radiostation[veh] = 0;
for(new i; i < GetMaxPlayers(); i++)
{
if(GetPlayerVehicleID(i) == veh)
{
switch(Radiostation[veh])
{
case 0: {GameTextForPlayer(i,"Radio Off",3000,5);StopAudioStreamForPlayer(i);}
case 1: {GameTextForPlayer(i,"Europa plus",3000,5);PlayAudioStreamForPlayer(i,"http://webcast.emg.fm:55655/europaplus128.mp3");}
case 2: {GameTextForPlayer(i,"Maks FM",3000,5);PlayAudioStreamForPlayer(i,"http://radio.maks-fm.ru:8000/maksfm128.m3u");}
case 3: {GameTextForPlayer(i,"ICE FM",3000,5);PlayAudioStreamForPlayer(i,"http://icefm.ru/etc/live.m3u");}
case 4: {GameTextForPlayer(i,"Vesti FM",3000,5);PlayAudioStreamForPlayer(i,"http://audio.rambler.ru/play.html?id=2537099");}
case 5: {GameTextForPlayer(i,"Russian Radio",3000,5);PlayAudioStreamForPlayer(i,"http://radio01-cn03.akadostream.ru:8000/russianradio128.mp3");}
case 6: {GameTextForPlayer(i,"Mayak Radio",3000,5);PlayAudioStreamForPlayer(i,"http://radio01-cn03.akadostream.ru:8000/mayak128.mp3");}
case 7: {GameTextForPlayer(i,"Nashe Radio",3000,5);PlayAudioStreamForPlayer(i,"http://188.127.243.169:80/nashe-192");}
case 8: {GameTextForPlayer(i,"Retro FM",3000,5);PlayAudioStreamForPlayer(i,"http://radio01-cn03.akadostream.ru:8000/radioretro128.mp3");}
case 9: {GameTextForPlayer(i,"Radio Shanson",3000,5);PlayAudioStreamForPlayer(i,"http://radio02-cn03.akadostream.ru:8108/shanson128.mp3");}
case 10: {GameTextForPlayer(i,"Nashi Pesni",3000,5);PlayAudioStreamForPlayer(i,"http://online.nashipesni.ru:8000/nashipesni");}
case 11: {GameTextForPlayer(i,"D-fm",3000,5);PlayAudioStreamForPlayer(i,"http://santa-rossa.ru/Vse_dly_samp/dfm.m3u");}
case 12: {GameTextForPlayer(i,"Ultra",3000,5);PlayAudioStreamForPlayer(i,"http://santa-rossa.ru/Vse_dly_samp/radio_ultra_192.m3u");}
case 13: {GameTextForPlayer(i,"Nashe Radio",3000,5);PlayAudioStreamForPlayer(i,"http://santa-rossa.ru/Vse_dly_samp/nashe-192.m3u");}
case 14: {GameTextForPlayer(i,"Full-On",3000,5);PlayAudioStreamForPlayer(i,"http://santa-rossa.ru/Vse_dly_samp/full-on.m3u");}
}
}
}
}
return 1;
}
if (strcmp("/back", cmdtext, true, 10) == 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new veh = GetPlayerVehicleID(playerid);
if(Radiostation[veh] != 0)Radiostation[veh] --;
else Radiostation[veh] = 10;
for(new i; i < GetMaxPlayers(); i++)
{
if(GetPlayerVehicleID(i) == veh)
{
switch(Radiostation[veh])
{
case 0: {GameTextForPlayer(i,"Radio Off",3000,5);StopAudioStreamForPlayer(i);}
case 1: {GameTextForPlayer(i,"Europa plus",3000,5);PlayAudioStreamForPlayer(i,"http://webcast.emg.fm:55655/europaplus128.mp3");}
case 2: {GameTextForPlayer(i,"Maks FM",3000,5);PlayAudioStreamForPlayer(i,"http://radio.maks-fm.ru:8000/maksfm128.m3u");}
case 3: {GameTextForPlayer(i,"ICE FM",3000,5);PlayAudioStreamForPlayer(i,"http://icefm.ru/etc/live.m3u");}
case 4: {GameTextForPlayer(i,"Vesti FM",3000,5);PlayAudioStreamForPlayer(i,"http://audio.rambler.ru/play.html?id=2537099");}
case 5: {GameTextForPlayer(i,"Russian Radio",3000,5);PlayAudioStreamForPlayer(i,"http://radio01-cn03.akadostream.ru:8000/russianradio128.mp3");}
case 6: {GameTextForPlayer(i,"Mayak Radio",3000,5);PlayAudioStreamForPlayer(i,"http://radio01-cn03.akadostream.ru:8000/mayak128.mp3");}
case 7: {GameTextForPlayer(i,"Nashe Radio",3000,5);PlayAudioStreamForPlayer(i,"http://188.127.243.169:80/nashe-192");}
case 8: {GameTextForPlayer(i,"Retro FM",3000,5);PlayAudioStreamForPlayer(i,"http://radio01-cn03.akadostream.ru:8000/radioretro128.mp3");}
case 9: {GameTextForPlayer(i,"Radio Shanson",3000,5);PlayAudioStreamForPlayer(i,"http://radio02-cn03.akadostream.ru:8108/shanson128.mp3");}
case 10: {GameTextForPlayer(i,"Nashi Pesni",3000,5);PlayAudioStreamForPlayer(i,"http://online.nashipesni.ru:8000/nashipesni");}
case 11: {GameTextForPlayer(i,"D-fm",3000,5);PlayAudioStreamForPlayer(i,"http://santa-rossa.ru/Vse_dly_samp/dfm.m3u");}
case 12: {GameTextForPlayer(i,"Ultra",3000,5);PlayAudioStreamForPlayer(i,"http://santa-rossa.ru/Vse_dly_samp/radio_ultra_192.m3u");}
case 13: {GameTextForPlayer(i,"Nashe Radio",3000,5);PlayAudioStreamForPlayer(i,"http://santa-rossa.ru/Vse_dly_samp/nashe-192.m3u");}
case 14: {GameTextForPlayer(i,"Full-On",3000,5);PlayAudioStreamForPlayer(i,"http://santa-rossa.ru/Vse_dly_samp/full-on.m3u");}
}
}
}
}
return 1;
} [/code]
5. dpublic OnPlayerKeyStateChange
Код
if(newkeys == 8192)OnPlayerCommandText(playerid,"/back");// Num 4
if(newkeys == 16384)OnPlayerCommandText(playerid,"/nextradio");// Num 6



[img]http://status.cmhost.ru/skype.php?id=seregadiego1[/img]
RAKSHA1337 Дата: Воскресенье, 06.07.2014, 14:51 | Сообщение # 2
Советник
Сообщений: 784
Статус: Offline
Эмм ошибся темой

В казино рандом. Но рандом в программах - это генератор псевдослучайных чисел, который написан ручками человека. А значит есть формула! Есть алгоритм! Есть тактика!
Кто не согласен - ставьте минус, после того как докажете обратное. https://habrahabr.ru/post/196442/
CM_PAKET Дата: Среда, 09.07.2014, 13:40 | Сообщение # 3
Боец
Сообщений: 273
Статус: Offline
Если просто скопировал всё,мог бы хотя бы оформить по красивее!
+говноскрипты без [code] [/code]


Работай, как-будто тебе не надо денег.
Люби, как-будто тебе никто никогда не причинял боль.
Танцуй, как-будто никто не смотрит.
Пой,словно никто не слышит.
Живи, как-будто на земле рай...

pawno,cleo,c++,php

ЧАТ ИСТИННЫХ ЧИТЕРОВ http://cheat-master.ru/forum/160-360908-1

Всем добра:)
BY PAKET
fff2222 Дата: Вторник, 29.07.2014, 18:01 | Сообщение # 4
Новичок
Сообщений: 7
Статус: Offline
norm

Добавлено (29.07.2014, 18:01)
---------------------------------------------
normik


R207503549205
Klasnaya Дата: Среда, 30.07.2014, 09:08 | Сообщение # 5
Боец
Сообщений: 223
Статус: Offline
Цитата CM_PAKET ()
Если просто скопировал всё,мог бы хотя бы оформить по красивее!
+говноскрипты без [code] [/code]

Ненравится несмотри может я долго писал + дальше лень было


[img]http://status.cmhost.ru/skype.php?id=seregadiego1[/img]
[CM]Fich Дата: Среда, 30.07.2014, 14:31 | Сообщение # 6
Бывалый
Сообщений: 401
Статус: Offline
Klasnaya, Ну так если лень было зачем создаешь темы тогда?
  • Страница 1 из 1
  • 1
Поиск:
Статистика Форума