SA-MP Forums Archive
➲*******,Voice MP3 CMD - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: ➲*******,Voice MP3 CMD (/showthread.php?tid=629699)



➲*******,Voice MP3 CMD - kolor4d0 - 02.03.2017

Postebin:http://pastebin.com/tfnq2tNE


Respuesta: ➲*******,Voice MP3 CMD - SammyJ - 02.03.2017

Audio


Re: ➲*******,Voice MP3 CMD - SrVinnyh - 03.03.2017

Code:
C:\Users\MiniMundos\Desktop\Servidor\filterscripts\Voices.pwn(20) : error 030: compound statement not closed at the end of file (started at line 14)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
@EDIT
PHP Code:
 #include <a_samp>
#include <zcmd>
#include <sscanf2>
#define vermelho 0xFF0000AA
CMD:voice(playeridparams[])
{
    new 
Texto[200],stringtexto[300];
    if(
sscanf(params"s"Texto)) return SendClientMessage(playeridvermelho"[ERRO]: /voice [Text]");
    new 
Float:PosXFloat:PosYFloat:PosZ;
    
GetPlayerPos(playeridPosXPosYPosZ);
    for(new 
iMAX_PLAYERS; ++i){if(IsPlayerConnected(i)) if(IsPlayerInRangeOfPoint(i30.0PosXPosYPosZ))
    {
        
format(stringtextosizeof(stringtexto), "https://translate.******.com/translate_tts?ie=UTF-8&q= %s &tl=pt-TW&client=tw-ob",Texto);
        
PlayAudioStreamForPlayer(istringtexto);
        
PlayerPlaySound(i,1057,0.0,0.0,0.0);




Re: ➲*******,Voice MP3 CMD - IlanZ - 03.03.2017

Quote:
Originally Posted by SrVinnyh
View Post
Code:
C:\Users\MiniMundos\Desktop\Servidor\filterscripts\Voices.pwn(20) : error 030: compound statement not closed at the end of file (started at line 14)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
@EDIT
PHP Code:
 #include <a_samp>
#include <zcmd>
#include <sscanf2>
#define vermelho 0xFF0000AA
CMD:voice(playeridparams[])
{
    new 
Texto[200],stringtexto[300];
    if(
sscanf(params"s"Texto)) return SendClientMessage(playeridvermelho"[ERRO]: /voice [Text]");
    new 
Float:PosXFloat:PosYFloat:PosZ;
    
GetPlayerPos(playeridPosXPosYPosZ);
    for(new 
iMAX_PLAYERS; ++i){if(IsPlayerConnected(i)) if(IsPlayerInRangeOfPoint(i30.0PosXPosYPosZ))
    {
        
format(stringtextosizeof(stringtexto), "https://translate.******.com/translate_tts?ie=UTF-8&q= %s &tl=pt-TW&client=tw-ob",Texto);
        
PlayAudioStreamForPlayer(istringtexto);
        
PlayerPlaySound(i,1057,0.0,0.0,0.0);

Faltou o return 1


Re: ➲*******,Voice MP3 CMD - SrVinnyh - 03.03.2017

Quote:
Originally Posted by IlanZ
View Post
Faltou o return 1
Continua a mesma coisa

Code:
C:\Users\MiniMundos\Desktop\Servidor\filterscripts\Voices.pwn(21) : warning 217: loose indentation
C:\Users\MiniMundos\Desktop\Servidor\filterscripts\Voices.pwn(23) : error 030: compound statement not closed at the end of file (started at line 15)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
@Edit
PHP Code:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#define vermelho 0xFF0000AA
CMD:voice(playeridparams[])
{
    new 
Texto[200],stringtexto[300];
    if(
sscanf(params"s"Texto)) return SendClientMessage(playeridvermelho"[ERRO]: /voice [Text]");
    new 
Float:PosXFloat:PosYFloat:PosZ;
    
GetPlayerPos(playeridPosXPosYPosZ);
    for(new 
iMAX_PLAYERS; ++i){if(IsPlayerConnected(i)){if(IsPlayerInRangeOfPoint(i30.0PosXPosYPosZ))
    {
        
format(stringtextosizeof(stringtexto), "https://translate.******.com/translate_tts?ie=UTF-8&q= %s &tl=pt-TW&client=tw-ob",Texto);
        
PlayAudioStreamForPlayer(istringtexto);
        
PlayerPlaySound(i,1057,0.0,0.0,0.0);
    }
    return 
1;




Re: ➲*******,Voice MP3 CMD - capron - 03.03.2017

PHP Code:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#define vermelho 0xFF0000AA
CMD:voice(playeridparams[])
{
    new 
Texto[200],
        
stringtexto[300];
    if (
sscanf(params"s"Texto)) return SendClientMessage(playeridvermelho"[ERRO]: /voice [Text]");{
        new 
Float:PosX,
            
Float:PosY,
            
Float:PosZ;
        
GetPlayerPos(playeridPosXPosYPosZ);
        for (new 
i;i<MAX_PLAYERS;++i){
            if (
IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i30.0PosXPosYPosZ)){
                
format(stringtextosizeof(stringtexto), "https://translate.******.com/translate_tts?ie=UTF-8&q= %s &tl=pt-TW&client=tw-ob",Texto);
                
PlayAudioStreamForPlayer(istringtexto);
                
PlayerPlaySound(i,1057,0.0,0.0,0.0);
            }
        }
    }
    return 
1;




Re: ➲*******,Voice MP3 CMD - SrVinnyh - 03.03.2017

Quote:
Originally Posted by capron
View Post
PHP Code:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#define vermelho 0xFF0000AA
CMD:voice(playeridparams[])
{
    new 
Texto[200],
        
stringtexto[300];
    if (
sscanf(params"s"Texto)) return SendClientMessage(playeridvermelho"[ERRO]: /voice [Text]");{
        new 
Float:PosX,
            
Float:PosY,
            
Float:PosZ;
        
GetPlayerPos(playeridPosXPosYPosZ);
        for (new 
i;i<MAX_PLAYERS;++i){
            if (
IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i30.0PosXPosYPosZ)){
                
format(stringtextosizeof(stringtexto), "https://translate.******.com/translate_tts?ie=UTF-8&q= %s &tl=pt-TW&client=tw-ob",Texto);
                
PlayAudioStreamForPlayer(istringtexto);
                
PlayerPlaySound(i,1057,0.0,0.0,0.0);
            }
        }
    }
    return 
1;

Vlw cara