[Ajuda]Chat Global
#2

no meu GM eu uso assim, nunca testei com outros jogadores mas acredito que funcione
pawn Код:
public OnPlayerText(playerid, text[])
{
    format(String, sizeof(String), "%s Diz: %s", Nome(playerid), text);
    MensagemPerto(playerid, String, 20.0, CINZA1, CINZA2, CINZA3, CINZA4, CINZA5);
    return 0;
}
fim do gm
pawn Код:
stock MensagemPerto(playerid, mensagem[], Float:raio, cor1, cor2, cor3, cor4, cor5)
{
    new Float:X,
        Float:Y,
        Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    foreach(Player, i)
    {
        if(IsPlayerInRangeOfPoint(i, raio/16, X, Y, Z))
        {
            SendClientMessage(i, cor1, mensagem);
        }
        else if(IsPlayerInRangeOfPoint(i, raio/8, X, Y, Z))
        {
            SendClientMessage(i, cor2, mensagem);
        }
        else if(IsPlayerInRangeOfPoint(i, raio/4, X, Y, Z))
        {
            SendClientMessage(i, cor3, mensagem);
        }
        else if(IsPlayerInRangeOfPoint(i, raio/2, X, Y, Z))
        {
            SendClientMessage(i, cor4, mensagem);
        }
        else if(IsPlayerInRangeOfPoint(i, raio, X, Y, Z))
        {
            SendClientMessage(i, cor5, mensagem);
        }
    }
    return 1;
}
Reply


Messages In This Thread
[Ajuda]Chat Global - by joaonaveia - 11.03.2012, 00:41
Re: [Ajuda]Chat Global - by Lucas_Alemao - 11.03.2012, 00:47
Re: [Ajuda]Chat Global - by joaonaveia - 11.03.2012, 01:20
Re: [Ajuda]Chat Global - by humildadeforever - 11.03.2012, 01:24
Re: [Ajuda]Chat Global - by steki. - 11.03.2012, 01:28
Re: [Ajuda]Chat Global - by joaonaveia - 11.03.2012, 01:35
Re: [Ajuda]Chat Global - by Lucas_Alemao - 11.03.2012, 01:35

Forum Jump:


Users browsing this thread: 2 Guest(s)