[Tutorial] SetPlayerChatBubble
#1

Como apagaram o meu 2 meses e atrбs. vim postar novamente:

Boa noite '-' sou o
player, venho aqui postar esse meio tutorial
Sobre SetPlayerChatBubble
- 1є Tutorial -
pawn Код:
/*1- Oque й SetPlayerChatBuble?
R: ChatBubble й o texto que fica em cima da cabeзa do jogador.

2- Como eu uso ele?
R: Existe vбrias formas de vocк usa-lo.
Sendo na Callback ' OnPlayerText ' ou vocк pode usa-lo para aparecer um texto a sua escolha
Em Cima da cabeзa do Player.
Eu vou usar o texto: Adminstrador. Somente para adminstradores logados na RCON

3- Qual й melhor usar? ChatBubble ou AttachPlayer3dtext
R:Attach3DTextLabelToPlayer
*/

public OnPlayerText(playerid, text[]) // CallBack
{
    SetPlayerChatBubble(playerid, text, -1, 100.0, 10000); // -1 = Cor do Texto que vai aparecer em cima da cabeзa dele. //  100.0 = Distancia // 10000 = Segundos em que vгo aparecer // text = O Texto que o Player Digita.
/*
// Outra funзгo!
if(txt[0] == '!') // Ex: ! Oi | Oque vocк digitar dps do ! , vai aparecer em cima da sua cabeзa '-'
{
SetPlayerChatBubble(playerid,txt[],-1,35.0,10000); // -1 = Cor // 35.0 = Distancia, // 10000 = Segundos em que vгo aparecer.
return 0;
}*/

    return 1;
}

/* Como faзo para botar pra aparecer: ~ Adminstrador ~ emcima da cabeзa do player?
Simples sua soluзгo chegou =) xD*/


//Adicione esta forward junto as outras forwards '-'
forward AtualizarChatBubble();

//Adicione este settimer na public OnGameModeInit
SetTimer("AtualizarChatBubble", 1000, true);

// Callback ._.
public AtualizarChatBubble()
{
    for(new x=0; x < MAX_PLAYERS; x++)
    {
        if(IsPlayerAdmin(x))
        {
            SetPlayerChatBubble(x, "Administrador", 0xFF0000AA, 100.0, 10000); // 0xFF0000AA = Cor // 0xFF0000AA = Cor Vermelho .
        //Vocк pode alterar o texto " Adminstrador " pelo texto a sua escolha. ;)
        }
    }
}
Reply


Messages In This Thread
SetPlayerChatBubble - by dPlaYer_ - 15.04.2012, 21:28
Re: SetPlayerChatBubble - by Gustavo_z - 15.04.2012, 21:29
Re: SetPlayerChatBubble - by dPlaYer_ - 15.04.2012, 21:30
Re: SetPlayerChatBubble - by Deanx - 15.04.2012, 21:35
Re: SetPlayerChatBubble - by [NVC]Eduardo - 15.04.2012, 21:36
Re: SetPlayerChatBubble - by [NV]Dr._.THE - 15.04.2012, 21:59
Re: SetPlayerChatBubble - by 4LiSs0N - 15.04.2012, 22:13
Re: SetPlayerChatBubble - by ggT - 15.04.2012, 22:13
Re: SetPlayerChatBubble - by dPlaYer_ - 15.04.2012, 22:15
Re: SetPlayerChatBubble - by ggT - 15.04.2012, 22:38

Forum Jump:


Users browsing this thread: 1 Guest(s)