/drink - problem
#9

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_ONFOOT)
    {
        StopAudioStreamForPlayer(playerid);
    }
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[128], id;
    cmd = strtok(cmdtext, id);

    if (strcmp(cmd, "/muzica", true) == 0)
    {
    if(IsPlayerInAnyVehicle(playerid) == 1 && GetPlayerVehicleSeat(playerid) == 0)
    {
    ShowPlayerDialog(playerid, Dialog_radio, DIALOG_STYLE_LIST, "Radio InFlame Live", "Pro Fm\nRing Fm\nActualitati\nMuzica 90s\nPrahova\nMuzica 80s\nBrasov\nCluj\nBraila\nGalati\nBucuresti\nTaraf\nVenus\nPro Fm Love\nHit\nConstanta\nAlba Iulia\nPopulara\nHouse\nDans\nMuzica Copii\nBlue Sky Fm\nUBB Radio\nMuzica Romaneasca\nBacau\nPitesti\n", "Asculta","Opreste");
    return 1;
    }
    else
    {
    SendClientMessage(playerid, 0xFF330000, "SERVER: Trebuie sa fiti la Volan pentru a porni Radio!");
    return 1;
    }
    }
    return 0;
    }

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if( dialogid == Dialog_radio )
    {
    if( response )
    {
    if( listitem == 0 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://stream.profm.ro:8012/profm.mp3");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: Pro Fm");
    }
    }
    return 1;
    }
    if( listitem == 1 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://86.127.81.176:8000/live");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: Ring Fm ");
    }
    }
    return 1;
    }
    if( listitem == 2 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://stream2.srr.ro:8000/");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: Actualitati ");
    }
    }
    return 1;
    }
    if( listitem == 3 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://stream.profm.ro:8092/90s.mp3");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: Muzica 90s  ");
    }
    }
    return 1;
    }
    if( listitem == 4 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://ronix-live.rph.ro:8100/");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: Prahova");
    }
    }
    return 1;
    }
    if( listitem == 5 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://stream.profm.ro:8122/80s.mp3");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: Muzica 80s ");
    }
    }
    return 1;
    }
    if( listitem == 6 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://82.77.45.227:8000");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: Brasov ");
    }
    }
    return 1;
    }
    if( listitem == 7 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://86.35.4.198:8006/");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: Cluj ");
    }
    }
    return 1;
    }
    if( listitem == 8 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://95.76.53.191:8001/");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: Braila  ");
    }
    }
    return 1;
    }
    if( listitem == 9 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://85.120.237.64:8000/");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: Galati  ");
    }
    }
    return 1;
    }
    if( listitem == 10 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://89.238.227.6:8032/");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: Bucuresti");
    }
    }
    return 1;
    }
    if( listitem == 11 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://asculta.radiotaraf.com:7100/");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: Taraf");
    }
    }
    return 1;
    }
    if( listitem == 12 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://asculta.radiovenus.ro:8100/");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: Venus");
    }
    }
    return 1;
    }
    if( listitem == 13 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://stream.profm.ro:8072/love.mp3");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: ProFm Love");
    }
    }
    return 1;
    }
    if( listitem == 14 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://hit-radio.no-ip.org:8374/");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: Hit");
    }
    }
    return 1;
    }
    if( listitem == 15 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://live.radioconstanta.ro:9002/");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: Constanta ");
    }
    }
    return 1;
    }
    if( listitem == 16 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://live.ardeleanulfm.ro:8000/live128");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: Alba Iulia");
    }
    }
    return 1;
    }
    if( listitem == 17 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://94.23.232.141:8070/");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: Muzica Populara");
    }
    }
    return 1;
    }
    if( listitem == 18 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://www.texfm.ro:8000/house");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: Muzica House ");
    }
    }
    return 1;
    }
    if( listitem == 19 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://radiohit-dance.no-ip.org:8888/");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: Muzica Dance  ");
    }
    }
    return 1;
    }
    if( listitem == 20 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://stream.profm.ro:8262/kids.mp3");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: Muzica Copii  ");
    }
    }
    return 1;
    }
    if( listitem == 21 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://radiobluesky.net:8200/");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: Blue Sky Fm ");
    }
    }
    return 1;
    }
    if( listitem == 22 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://stream.radio.ubbcluj.ro:8000/ubb.mp3");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: UBB Radio ");
    }
    }
    return 1;
    }
    if( listitem == 23 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://stream.profm.ro:8242/profmro.mp3");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: Muzica Romaneasca ");
    }
    }
    return 1;
    }
    if( listitem == 24 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://46.102.251.55:8000/stream/1/");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: Bacau ");
    }
    }
    return 1;
    }
    if( listitem == 25 )
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    PlayAudioStreamForPlayer(i, "http://82.79.122.196:8000/");
    SendClientMessage(i, 0xFF330000, "{ACFF05}Ascultati Radio Live: Pitesti ");
    }
    }
    }
    }
    else
    {
    new vehid = GetPlayerVehicleID(playerid);
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInVehicle(i, vehid))
    {
    SendClientMessage(i, 0xFF330000,"** Ai Oprit Radio-ul! **");
    StopAudioStreamForPlayer(i);
    }
    }
    }
    }
    return 1;
    }
Reply


Messages In This Thread
/drink - problem - by Dan_Barocu - 17.06.2012, 12:11
Re: /drink - problem - by Ironboy - 17.06.2012, 12:46
Re: /drink - problem - by Dan_Barocu - 17.06.2012, 12:58
Re: /drink - problem - by Dan_Barocu - 17.06.2012, 15:44
Re: /drink - problem - by Kindred - 17.06.2012, 15:54
Re: /drink - problem - by rachit_rocks - 17.06.2012, 15:57
Re: /drink - problem - by Dan_Barocu - 17.06.2012, 16:00
Re: /drink - problem - by milanosie - 17.06.2012, 17:20
Re: /drink - problem - by Dan_Barocu - 17.06.2012, 20:02
Re: /drink - problem - by milanosie - 17.06.2012, 20:29

Forum Jump:


Users browsing this thread: 3 Guest(s)