Pq nгo ta pegando texto em cima da cabeзa -
oliverarrow - 28.12.2014
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!
Re: Pq nгo ta pegando texto em cima da cabeзa -
WendeLKILL - 29.12.2014
Como assim nгo pega direito ?
Re: Pq nгo ta pegando texto em cima da cabeзa -
Skun Fly - 29.12.2014
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;
}
Re: Pq nгo ta pegando texto em cima da cabeзa -
oliverarrow - 29.12.2014
Quote:
Originally Posted by WendeLKILL
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
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!
Re: Pq nгo ta pegando texto em cima da cabeзa -
ZeZin - 29.12.2014
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
Re: Pq nгo ta pegando texto em cima da cabeзa -
ipsLuan - 29.12.2014
Coloca um SetTimerEx.
pawn Code:
SetTimerEx("AtualizarChatBubble", 1000, true, "i", playerid);
Re: Pq nгo ta pegando texto em cima da cabeзa -
[BOPE]Seu._.Madruga - 29.12.2014
PHP Code:
public OnGameModeInit()
{
SetTimer("AtualizarChatBubble", 2000, true);
return 1;
}
PHP Code:
forward AtualizarChatBubble();
public AtualizarChatBubble()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(VIP[i] == 1) return SetPlayerChatBubble(i, "VIP", COLOR_BRONZE, 100.0, 10000);
if(VIP[i] == 2) return SetPlayerChatBubble(i, "VIP", COLOR_SILVER, 100.0, 10000);
if(VIP[i] == 3) return SetPlayerChatBubble(i, "VIP", COLOR_GOLD, 100.0, 10000);
}
return 1;
}
Re: Pq nгo ta pegando texto em cima da cabeзa -
oliverarrow - 29.12.2014
Quote:
Originally Posted by ZeZin
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