- Регистрация
- 12 Фев 2012
- Сообщения
- 387
- Лучшие ответы
- 0
- Репутация
- 190
Показываю свою версию радио в машине
Врубается автоматически
Работает на основе стримера PlayAudioStreamerForPlayer
Врубается автоматически
Работает на основе стримера PlayAudioStreamerForPlayer
1. ко всем new
PHP:
new Radiostation[MAX_VEHICLES];//радио в машине
PHP:
for(new v; v < MAX_VEHICLES; v++)Radiostation[v] = random(14);//Радиостанции
PHP:
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);
PHP:
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;
}
PHP:
if(newkeys == 8192)OnPlayerCommandText(playerid,"/back");// Num 4
if(newkeys == 16384)OnPlayerCommandText(playerid,"/nextradio");// Num 6
Чтобы видеть скрытое содержание Зарегистрируйтесь на форуме!
[Cleo] Car teleport for Samp-Rp
[Урок] #pragma tabsize и warning 217
[Урок] ГангЗоны Samp-Rp (Зоны Trigger'a)
[Урок] Онлайн радио в машине ( by Saimon )
[MAP] Респавн бомжей
[FS] /dragleader - уволить лидера оффлайн
[FS] Лотерея от админа!
[FS] /bzp - ремень безопасности
[FS] Грабим дома как на Samp-Rp
Последнее редактирование: