SA-MP Forums Archive
SetPlayerChatBubble with Color - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SetPlayerChatBubble with Color (/showthread.php?tid=419586)



SetPlayerChatBubble with Color - Youtube12 - 01.03.2013

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


Re: SetPlayerChatBubble with Color - Ananisiki - 01.03.2013

[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;
}


AW: SetPlayerChatBubble with Color - Youtube12 - 01.03.2013

No....

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


Re: SetPlayerChatBubble with Color - Denying - 01.03.2013

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.


AW: SetPlayerChatBubble with Color - Youtube12 - 01.03.2013

Not work.

Help me guys ^^


Re: SetPlayerChatBubble with Color - Patrick - 01.03.2013

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;
}



Re: SetPlayerChatBubble with Color - [MG]Dimi - 01.03.2013

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


AW: Re: SetPlayerChatBubble with Color - Youtube12 - 01.03.2013

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


AW: Re: SetPlayerChatBubble with Color - Youtube12 - 01.03.2013

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.


Re: AW: Re: SetPlayerChatBubble with Color - Patrick - 01.03.2013

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