[HELP] Chat Bubble -
c0GI - 10.05.2012
Hy, I want to anyone help me about SetPlayerChatBubble!
I wanted to put chat bubble if is player lower level that 2 to show chat bubble over the head of the player and show the this text "[ Turista ]"
I know that I must have a timer becouse if player play for a long time, the chat bubble will disappear, and I must set a timer for this chat bubble BUT I DONT KNOW HOW TO SET TIMER FOR THIS!
Like a:
Код:
if(PlayerInfo[playerid][pLevel] <= 1)
{
if(IsPlayerConnected(para1))
{
GetPlayerName(playerid, name, sizeof(name));
SetPlayerChatBubble(playerid, "[ Turista ]", COLOR_LIGHTRED, 40.0, 6600000);
}
return 1;
}
HELP ME
Re: [HELP] Chat Bubble -
c0GI - 10.05.2012
But I dont know to set a timer

HELP
Re: [HELP] Chat Bubble -
iGetty - 10.05.2012
Here.
Parameters:
(playerid, text[], color, Float:drawdistance, expiretime)
playerid The player which should have the chat bubble.
text[] The text to display.
color The text color
drawdistance The distance from where players are able to see the chat bubble.
expiretime The time in miliseconds the bubble should be displayed for.
Returns This function doesn't return a specific value
Example:
pawn Код:
public OnPlayerText(playerid, text[])
{
SetPlayerChatBubble(playerid, text, 0xFF0000FF, 100.0, 10000);
return 1;
}
Re: [HELP] Chat Bubble -
Jonny5 - 10.05.2012
you said that just mins ago..
dont bump its against the rules. and annoying
https://sampwiki.blast.hk/wiki/SetTimer <~~read that page and youll learn how to use a timer..
@iGetty
thats not what they asked for...
that will just set their chat bubble to what the type in chat
Respuesta: [HELP] Chat Bubble -
kirk - 10.05.2012
Why dont you just attach a 3dText to the player?
instead of sending a chat bubble 1000 times each second, aswell you would need to send a message to make it appear, so i dont think it would even work with a timer and update it.
https://sampwiki.blast.hk/wiki/Attach3DTextLabelToPlayer
Re: [HELP] Chat Bubble -
milanosie - 10.05.2012
Use a 3dTextLabel
Re: [HELP] Chat Bubble -
c0GI - 10.05.2012
I know, but I must use a chat bubble, and i dont know to set a timer for chat bubble :S
Respuesta: Re: [HELP] Chat Bubble -
kirk - 10.05.2012
Quote:
Originally Posted by c0GI
I know, but I must use a chat bubble, and i dont know to set a timer for chat bubble :S 
|
Well if you want a permanent chat bubble on the top of a player's head use a 3dTextLabel as we told you, its the same as the chat bubble but permanent.
That function you wanna use dissappears because its suposed to handle player's chat messages, not permanent text's over player heads, if you use the timer you will call that function million times while a player is online which is inefficient and makes no sense.
Re: [HELP] Chat Bubble -
c0GI - 10.05.2012
I know! I was used a 3dtext and there is a problem! While any player runing, the 3dtext will move, up or down!
And that is the problem on 3dtext, and I want to use chat bubble becouse the chat bubble didn't move!! Chat bubble is stabilized!
Respuesta: Re: [HELP] Chat Bubble -
kirk - 10.05.2012
Quote:
Originally Posted by c0GI
I know! I was used a 3dtext and there is a problem! While any player runing, the 3dtext will move, up or down!
And that is the problem on 3dtext, and I want to use chat bubble becouse the chat bubble didn't move!! Chat bubble is stabilized!
|
Never experienced such problem with 3dText's, but well if you wanna use it with that function go for it and try it yourself, create a callback (public function, forwarded) that Sets the chat bubble to a player, then call that callback on the timer, a tip as it seems you want it permanent; put a large ammount of miliseconds on the expiretime parameter and the same on the timer, so you avoid unnecesary calls of it.
Its like saying you wanna jump of a plane with no parachute because its annoying and doesnt let you move as you wish.
Read some documentation of timers on the wiki, you will understand how to do it, if you actually read it.