[Ajuda] Rank por score em cima da cabeзa(ChatBubble)
#6

https://sampwiki.blast.hk/wiki/SetPlayerChatBubble

SetPlayerChatBubble(playerid, text[], color, Float:drawdistance, expiretime)

Vocк vai precisar de um timer para re-usar a funзгo, pois depois de um tempo (5 segundos como no parвmetro expiretime em seu codigo) o Chat Bubble vai expirar.

Exemplo:

PHP код:
public OnGameModeInit()
{
        
SetTimer("ChatBubble"1000true);
        return 
1;
}
forward ChatBubble();
public 
ChatBubble()
{
    for(new 
0GetPlayerPoolSize(); <= j; ++i)
    {
        if(
IsPlayerConnected(i))
        {
            switch (
GetPlayerScore(i))
            {
                case 
0SetPlayerChatBubblei"Jogador"0x1100FFFF100.02000 );
                case 
1SetPlayerChatBubblei"Helper"0x1100FFFF100.02000 );
                case 
2SetPlayerChatBubblei"Moderador(a)"0x2DF0A2FF100.02000 );
                case 
3SetPlayerChatBubblei"Administrador(a)"0x00C40DFF100.02000 );
                case 
4SetPlayerChatBubblei"Diretor(a)"0xFF9900FF100.02000 );
            }
        }
    }

Recomendaria usar foreach. Tambйm existem 3D Text Labels, que recomendaria usar no lugar de ChatBubble: https://sampwiki.blast.hk/wiki/Create3DTextLabel
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)