[Ajuda] Pq nгo ta pegando texto em cima da cabeзa
#1

Tava tentando fazer testos em cima da cabeзa, tipo se vc for VIP pra mostrar q vc era vip
Pq nгo ta indo?

Onplayerspawn
pawn Code:
AtualizarChatBubble(playerid);
pawn Code:
forward AtualizarChatBubble(playerid);
public AtualizarChatBubble(playerid)
{
    if(VIP[playerid] == 1) return SetPlayerChatBubble(playerid, "VIP", COLOR_BRONZE, 100.0, 10000);
    if(VIP[playerid] == 2) return SetPlayerChatBubble(playerid, "VIP", COLOR_SILVER, 100.0, 10000);
    if(VIP[playerid] == 3) return SetPlayerChatBubble(playerid, "VIP", COLOR_GOLD, 100.0, 10000);
    return 1;
}
Compila sem erros, mas no jogo nгo pega direito!
Reply
#2

Como assim nгo pega direito ?
Reply
#3

Tenta:
pawn Code:
forward AtualizarChatBubble(playerid);
public AtualizarChatBubble(playerid)
{
    if(VIP[playerid] == 1){ SetPlayerChatBubble(playerid, "VIP", COLOR_BRONZE, 100.0, 10000); return 1; }
    if(VIP[playerid] == 2){ SetPlayerChatBubble(playerid, "VIP", COLOR_SILVER, 100.0, 10000); return 1; }
    if(VIP[playerid] == 3){ SetPlayerChatBubble(playerid, "VIP", COLOR_GOLD, 100.0, 10000); return 1;}
    return 1;
}
Reply
#4

Quote:
Originally Posted by WendeLKILL
View Post
Como assim nгo pega direito ?
Nгo estб aparecendo o texto com VIP e a cor em cima da cabeзa do cara

Quote:
Originally Posted by Skun Fly
View Post
Tenta:
pawn Code:
forward AtualizarChatBubble(playerid);
public AtualizarChatBubble(playerid)
{
    if(VIP[playerid] == 1){ SetPlayerChatBubble(playerid, "VIP", COLOR_BRONZE, 100.0, 10000); return 1; }
    if(VIP[playerid] == 2){ SetPlayerChatBubble(playerid, "VIP", COLOR_SILVER, 100.0, 10000); return 1; }
    if(VIP[playerid] == 3){ SetPlayerChatBubble(playerid, "VIP", COLOR_GOLD, 100.0, 10000); return 1;}
    return 1;
}
Tambйm nгo estб funcioanndo!
Reply
#5

Vocк so quer o Nome usar

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

Se for quando player digita e o texto aparece coloque

pawn Code:
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.
/*
Pegei de um tutorial do forum
Reply
#6

Coloca um SetTimerEx.

pawn Code:
SetTimerEx("AtualizarChatBubble", 1000, true, "i", playerid);
Reply
#7


PHP Code:
public OnGameModeInit()
{
    
SetTimer("AtualizarChatBubble"2000true);
    return 
1;

PHP Code:
forward AtualizarChatBubble();
public 
AtualizarChatBubble()
{
    for(new 
0MAX_PLAYERSi++)
    {
        if(
VIP[i] == 1) return SetPlayerChatBubble(i"VIP"COLOR_BRONZE100.010000);
        if(
VIP[i] == 2) return SetPlayerChatBubble(i"VIP"COLOR_SILVER100.010000);
        if(
VIP[i] == 3) return SetPlayerChatBubble(i"VIP"COLOR_GOLD100.010000);
    }
    return 
1;

Reply
#8

Quote:
Originally Posted by ZeZin
View Post
Vocк so quer o Nome usar

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

Se for quando player digita e o texto aparece coloque

pawn Code:
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.
/*
Pegei de um tutorial do forum
Vlw +rep
Com essa funзгo q vc falou funcionou, nгo desse seu jeito aн, tem erros, mas a func eu dei uma olhada ficou de boa, vlw
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)