Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:voice(playerid, params[])
- {
- new Texto[200],stringtexto[300];
- if(sscanf(params, "s", Texto)) return SendClientMessage(playerid, vermelho, "[ERRO]: /voice [Text]");
- new Float:PosX, Float:PosY, Float:PosZ;
- GetPlayerPos(playerid, PosX, PosY, PosZ);
- for(new i; i < MAX_PLAYERS; ++i){if(IsPlayerConnected(i)){if(IsPlayerInRangeOfPoint(i, 30.0, PosX, PosY, PosZ))
- {
- format(stringtexto, sizeof(stringtexto), "https://translate.google.com/translate_tts?ie=UTF-8&q= %s &tl=pt-TW&client=tw-ob",Texto);
- PlayAudioStreamForPlayer(i, stringtexto);
- PlayerPlaySound(i,1057,0.0,0.0,0.0);
- }
- return 1;
- }
- CMD:youtubemp3(playerid, params[])
- {
- new url[300], string[200];
- if(sscanf(params, "s", url)) return SendClientMessage(playerid, -1, "[ERROR]: /YoutubeMP3 [URL]");
- if(strfind(url, "https://www.youtube.com/watch", false) != -1)
- {
- format(string, sizeof(string), "http://www.youtubeinmp3.com/fetch/?video=%s", url);
- for(new i; i<GetMaxPlayers(); i++)
- {
- PlayAudioStreamForPlayer(i, string);
- }
- }
- else return SendClientMessage(playerid, -1, "[ERROR]: Invalid URL");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement