SetPlayerChatBubble with Color
#1

Hi guys, i want to make a command like /headtext (text) with colors
Example 1: /headtext ~r~Iam ~g~*******~b~12
Example 2: /headtext ~p~Hater.exe~g~Has~w~~b~Stopped~b~Working
Pic:



Who can help me with that! thx
Reply
#2

[pawn]CMD:headtext(playerid, params[])
{
(isDead[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command When Dead.");
SetPlayerChatBubble(playerid, "~p~Hater.exe~g~has~w~~b~Stopped~b~Working, 60, 3000);
return 1;
}
Reply
#3

No....

I need like /headtext (text)
Not only 1text....
Reply
#4

if(strcmp(cmd, "/headtext", true) == 0)
{
if(isDead[playerid] == 1) return SendClientMessage(playerid, COLOR_ERROR, "ERROR: You may not use this command when you are dead");
SetPlayerChatBubble(playerid, cmdtext[11], 60, 3000);
return 1;
}

Not tested.
Reply
#5

Not work.

Help me guys ^^
Reply
#6

Try this you must have
sscanf by ****** Link: https://sampforum.blast.hk/showthread.php?tid=120356
zcmd by ZeeX Link: https://sampforum.blast.hk/showthread.php?tid=91354

pawn Код:
CMD:headtext(playerid, params[])
{
    /*
                    Parameters
    (playerid, text[], color, Float:drawdistance, expiretime)
    */

    new msg[128];
    if(sscanf(params,"s[128]",msg)) return SendClientMessage(playerid,-1,"USAGE: /headtext ( Message )");
    SetPlayerChatBubble(playerid/*playerid*/, msg/*Message*/, -1/*White*/, 50 , 3000/*3 Seconds*/);
    return 1;
}
Reply
#7

Did you test it with someone? You can't see own chat bubble.
Reply
#8

Quote:
Originally Posted by pds2012
Посмотреть сообщение
Try this you must have
sscanf by ****** Link: https://sampforum.blast.hk/showthread.php?tid=120356
zcmd by ZeeX Link: https://sampforum.blast.hk/showthread.php?tid=91354

pawn Код:
CMD:headtext(playerid, params[])
{
    /*
                    Parameters
    (playerid, text[], color, Float:drawdistance, expiretime)
    */

    new msg[128];
    if(sscanf(params,"s[128]",msg)) return SendClientMessage(playerid,-1,"USAGE: /headtext ( Message )");
    SetPlayerChatBubble(playerid/*playerid*/, msg/*Message*/, -1/*White*/, 50 , 3000/*3 Seconds*/);
    return 1;
}
I want with colors, EXAMPLE: /heatext ~g~hi
Reply
#9

Quote:
Originally Posted by [MG]Dimi
Посмотреть сообщение
Did you test it with someone? You can't see own chat bubble.
I saw it on a server.
Reply
#10

Quote:
Originally Posted by *******12
Посмотреть сообщение
I saw it on a server.
Did you test the code that i gave you ?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)