Jump to content

[REZOLVAT] Intrebare


Stunt3r47
 Share

Recommended Posts

Salutari!

Am o intrebare, in sistemul de radio de pe serverul de samp am Youtube Music, unde sa pun un link de pe youtube, pun linkul acolo dar nu porneste muzica, aveti vreo idee?

 Aici am casuta de dialog in care trebuie sa pun linkul:

 

if(dialogid == DIALOG_CUSTOMRADIO)
{
if(response)
{
if(IsPlayerInAnyVehicle(playerid))
{
new stringg[128],length,name[30];
if(strfind(inputtext, "youtube.com", true) != -1)
{
length = strlen(inputtext)-11;
strdel(inputtext, 0, length);
StopAudioStreamForPlayersInCar(vehicleid);
PlayAudioStreamForPlayersInCar(vehicleid, stringg);
format(customRadio[GetPlayerVehicleID(playerid)], 128, stringg);
vehRadio[GetPlayerVehicleID(playerid)] = 19;
GetPlayerName(playerid, name, sizeof(name));
format(stringg, sizeof(stringg), "* %s changed the radio station to Custom URL.",name);
ProxDetector(20.0, playerid, stringg, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
Listening[playerid] = 18;
}
else
{
StopAudioStreamForPlayersInCar(vehicleid);
PlayAudioStreamForPlayersInCar(vehicleid, inputtext);
format(customRadio[GetPlayerVehicleID(playerid)], 128, inputtext);
vehRadio[GetPlayerVehicleID(playerid)] = 19;
GetPlayerName(playerid, name, sizeof(name));
format(stringg, sizeof(stringg), "* %s changed the radio station to Custom URL.",name);
ProxDetector(20.0, playerid, stringg, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
Listening[playerid] = 18;
}
}
}
return 1;
}
 
 
Si mai am si asta:
 
stock YoutubeStreamForPlayer(playerid, vlink[])
{
    new videoid[128],
mp3link[128];
    strmid(videoid,vlink,strfind(vlink,"v=")+2,strfind(vlink,"v=")+15);
    PlayAudioStreamForPlayersInCar(GetPlayerVehicleID(playerid),mp3link);
return 1;
}

 

Am si include-ul youtube, ce trebuie sa adaug/modific sa mearga?

Edited by Stunt3r47
Link to comment
Share on other sites

 format(mp3link,128,"http://admigos.net/y...d=%s",videoid);

Site-ul pe care incerci sa il accesezi aici nu mai este disponibil.

Respecta si vei fi respectat.

 

BigInt Pawn:

Pacman C++: 

Snake C++:

Minesweeper C++:

 

mattbb.cash

leaks.ro

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...