SA-MP Forums Archive
[Ajuda] Chat Prуximo - 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 Prуximo (/showthread.php?tid=378440)



Chat Prуximo - Lord_Style - 17.09.2012

Problema:

Eu desenvolvi este xat para aparecer de perto, mas nгo esta aparecendo oque o player esta falando, somente quando o player esta sozinho ele funciona, mas quando esta mais de 1 jogador online ele nгo aparece a fala!

Cуdigo:

pawn Code:
public OnPlayerText(playerid, text[])
{
    new Float:Pos[3],string[128],Nome[24];
    GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
    GetPlayerName(playerid, Nome, MAX_PLAYER_NAME);
    format(string, 128, "%s diz: %s", Nome, text);
    SetPlayerChatBubble(playerid, text, -1, 100.0, 10000);
    for(new i; i != GetMaxPlayers(); i++)
    {
        if(IsPlayerInRangeOfPoint(i, 10, Pos[0], Pos[1], Pos[2]))
        {
            SendClientMessage(i, -1, string);
        }
        return 0;
    }    
    return 1;
}



Re: Chat Prуximo - Jason` - 17.09.2012

pawn Code:
public OnPlayerText(playerid, text[])
{
    new Float:Pos[3],string[128],Nome[24];
    GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
    GetPlayerName(playerid, Nome, MAX_PLAYER_NAME);
    format(string, 128, "%s diz: %s", Nome, text);
    SetPlayerChatBubble(playerid, text, -1, 100.0, 10000);
    for(new i; i != GetMaxPlayers(); i++)
    {
        if(IsPlayerInRangeOfPoint(i, 10, Pos[0], Pos[1], Pos[2]))
        {
            SendClientMessage(i, -1, string);
        }
    }
    return 0;
}
Quote:

This forum requires that you wait 120 seconds between posts. Please try again in 42 seconds.
This forum requires that you wait 120 seconds between posts. Please try again in 14 seconds.