SA-MP Forums Archive
[Ajuda] /megafone - 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: [Ajuda] /megafone (/showthread.php?tid=384669)



/megafone - Tiger_Maconha - 12.10.2012

Se alguem poder da uma ajuda ai no comando, quando eu do /megafone a messagem do Texto nгo aparece

pawn Код:
CMD:megafone(playerid, params[])//Arrumar Megafone !
{
    new string[100], texto[100];
    if(PlayerDados[playerid][Calado] == true) return SendClientMessage(playerid, -1, "Jogador nгo pode falar no megafone pq foi calado !");
    if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, -1, "Vocк nгo estб Online !");
    if(PlayerDados[playerid][Organizacao] != 2)
    {
        SendClientMessage(playerid, -1, "Vocк nгo й um Oficial do Governo !");
        return 1;
    }
    if(BaterCartao[playerid] != 1)
    {
        SendClientMessage(playerid, -1, "Vocк nгo {FF0000}Bateu Cartгo !");
        return 1;
    }
    if(sscanf(params, "s",texto)) return SendClientMessage(playerid, -1, "Use: /megafone [Fala]");
    if(PlayerDados[playerid][Organizacao] == 2)
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        format(string, sizeof(string), "Policial Militar %s: %s", Nome(playerid), texto);
        IsPlayerInRangeOfPoint(playerid,60.0,X,Y,Z);
        printf("%s", string);
    }
    return 1;
}
A Fala nгo aparece ...



Re: /megafone - ForT - 13.10.2012

PHP код:
CMD:megafone(playeridparams[])//Arrumar Megafone !
{
    new 
string[100], texto[100];
    if(
PlayerDados[playerid][Calado] == true) return SendClientMessage(playerid, -1"Jogador nгo pode falar no megafone pq foi calado !");
    if(!
IsPlayerConnected(playerid)) return SendClientMessage(playerid, -1"Vocк nгo estб Online !");
    if(
PlayerDados[playerid][Organizacao] != 2)
    {
        
SendClientMessage(playerid, -1"Vocк nгo й um Oficial do Governo !");
        return 
1;
    }
    if(
BaterCartao[playerid] != 1)
    {
        
SendClientMessage(playerid, -1"Vocк nгo {FF0000}Bateu Cartгo !");
         return 
1;
    }
    if(
sscanf(params"s",texto)) return SendClientMessage(playerid, -1"Use: /megafone [Fala]");
    if(
PlayerDados[playerid][Organizacao] == 2)
    {
        new 
Float:XFloat:YFloat:Z;
        
GetPlayerPos(playeridXYZ);
        
format(stringsizeof(string), "Policial Militar %s: %s"PlayerName(playerid), texto);
        for(new 
ii<300;i++)
        {
        if(
IsPlayerInRangeOfPoint(i,60.0,X,Y,Z))SendClientMessage(i,-1string);
        }
printf("%s"string);
    }
    return 
1;




Re: /megafone - Tiger_Maconha - 13.10.2012

Quote:
Originally Posted by ForT
Посмотреть сообщение
PHP код:
CMD:megafone(playeridparams[])//Arrumar Megafone !
{
    new 
string[100], texto[100];
    if(
PlayerDados[playerid][Calado] == true) return SendClientMessage(playerid, -1"Jogador nгo pode falar no megafone pq foi calado !");
    if(!
IsPlayerConnected(playerid)) return SendClientMessage(playerid, -1"Vocк nгo estб Online !");
    if(
PlayerDados[playerid][Organizacao] != 2)
    {
        
SendClientMessage(playerid, -1"Vocк nгo й um Oficial do Governo !");
        return 
1;
    }
    if(
BaterCartao[playerid] != 1)
    {
        
SendClientMessage(playerid, -1"Vocк nгo {FF0000}Bateu Cartгo !");
         return 
1;
    }
    if(
sscanf(params"s",texto)) return SendClientMessage(playerid, -1"Use: /megafone [Fala]");
    if(
PlayerDados[playerid][Organizacao] == 2)
    {
        new 
Float:XFloat:YFloat:Z;
        
GetPlayerPos(playeridXYZ);
        
format(stringsizeof(string), "Policial Militar %s: %s"PlayerName(playerid), texto);
        for(new 
ii<300;i++)
        {
        if(
IsPlayerInRangeOfPoint(i,60.0,X,Y,Z))SendClientMessage(i,-1string);printf("%s"string);
        }
    }
    return 
1;

Comando Atй pegou, Problema й que eu vi um Flood no Samp Serve, mais eu so escreve uma vez o comando
que foi /megafone aaa Olha o serve...


Re: /megafone - ForT - 13.10.2012

Dei edit, agora ta certo


Re: /megafone - Tiger_Maconha - 13.10.2012

Quote:
Originally Posted by ForT
Посмотреть сообщение
Dei edit, agora ta certo
Valeu +Rep vo ver se consigo da !