[AJUDA] Mudar o nome no chat
#1

Tem um monte de tуpico mais atй agora nem um me ajudo como eu quero,

Quando uma pessoa digitasse alguma coisa no chat eu queria que aparecesse assim:

Daniel_Henrrique(26) diz: Ola mundo

achei uns mais ficava tudo bugado e outros nem funcionava.

O do chat proximo eu ja acabei de saber que й sу por LimitGlobalChatRadius(20); agora sу fica a dъvida acima.
Reply
#2

pawn Код:
public OnPlayerText(playerid, text[])
{
    new Float:VBPos[3],VBString[128],VBNome[MAX_PLAYER_NAME];
    GetPlayerPos(playerid, VBPos[0], VBPos[1], VBPos[2]);
    GetPlayerName(playerid, VBNome, MAX_PLAYER_NAME);
    format(VBString, 128, "%s(%d) diz: %s", VBNome, playerid, text);
    for(new i; i != GetMaxPlayers(); i++)
        if(IsPlayerInRangeOfPoint(i, 20, VBPos[0], VBPos[1], VBPos[2]))
            SendClientMessage(i, -1, VBString);

    return 0;
}
Reply
#3

Vlw vini +rep

Sу ultima perguntinha

Poderiam me explicar como funciona quando a pessoa digitasse um texto aparecesse o texto em cima da cabeзa dela? To ligado desse Attach3DTextLabelToPlayer mais nгo sei como por.
Reply
#4

Em OnPlayerText:
pawn Код:
SetPlayerChatBubble(playerid, text, 0xFF0000FF, 100.0, 10000);

// 0xFF0000FF = Cor do texto que vai aparecer
// 100.0 = Distancia que a mensagem pode ser vista na cabeзa do player
// 10000 = Tempo em milesegundos, que a mensagem vai ficar sobre a cabeзa do player
Reply
#5

As duas formas possнveis sгo :

- Attach3DTextLabelToPlayer
- SetPlayerChatBubble


Pra chat, eu indico o segundo. Por que o primeiro fica lб atй vocк destruн-lo.
Reply
#6

Obrigado Jizzy +rep
vlw vini
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)