25.01.2017, 11:55
Код:
#include a_http CMD:lt(playerid) { HTTP(playerid, HTTP_GET, "www.*******inmp3.com/fetch/?format=text&video=http://www.youtube.com/watch?v=i62Zjga8JOM", "", "YT_HttpResponse"); return 1; } forward YT_HttpResponse(playerid, response, data[]); public YT_HttpResponse(playerid, response, data[]) { if(response == 200) //Sucesso (site retornou uma resposta) { new pos = strfind(data, "http://", true); //retornar posiзгo inicial do texto "http://" if(pos != -1) //se houver resultados { PlayAudioStreamForPlayer(playerid, data[pos]); //tocar o link data a partir da posiзгo encontrada } } return 1; }