[Ajuda] Chat Global - 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] Chat Global (
/showthread.php?tid=459566)
 
Chat Global - 
Sti -  23.08.2013
Queria saber como Bloquear o Chat Global pra Sempre, Sу pra 2 Pessoas verem ex:
Digitei Oi.
Aparece sу pra quem ta perto, Espero que me ajudem
Re: Chat Global - 
Juniiro3 -  23.08.2013
PHP код:
public OnPlayerText(playerid, text[])
{
    ChatProximo(playerid, 0x989898AA, 50.0, text); //Mude, й claro, para como quiser.
    return 0; //Aqui retorna 0!!!
}
ChatProximo(playerid, cor, Float:distancia, texto[])
{
    static Float:Pos[3];
    
    GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
    
    for (new i; i < MAX_PLAYERS; i++)
        if (IsPlayerInRangeOfPoint(i, distancia, Pos[0], Pos[1], Pos[2]))
            SendClientMessage(playerid, cor, texto);
    
    return 1;
} 
 Retirado do meu GM, use como quiser.
Re: Chat Global - 
Sti -  23.08.2013
:S nao conseguir
Meu OnPlayerText
pawn Код:
public OnPlayerText(playerid, text[])
{
    new aname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
    format(file, sizeof(file), PASTA_CONTAS, aname);
    PROTECT_CHAT(63, 0xC9170EFF, "[ERRO]: Texto muito grande! [63]");
    if (Mute[playerid] == 1)
    {
        SendClientMessage(playerid, Vermelho, "|_ ANTI-FLOOD _| Vocк nгo pode falar enquanto estб mudo!");
        return 0;
    }