[IDEA] Rainbow Name
#1

Is there anyway to make a rainbow name in Chat !??

Example: GeekSiMo: Hello
Reply
#2

Idk try this:
pawn Код:
new name[MAX_PLAYER_NAME + 1];
format(name, sizeof(name), "{FF0000}L{FFFFFF}O{FF0000}L{FFFFFF}");
SetPlayerName(playerid, name);
Reply
#3

Yes, It is possible, Use 0.3c Colors such {FFFFFF}.
Reply
#4

I Know But Can't Do it because pName %s
Reply
#5

Yeah, it's possible with color embedding since 0.3c, but SendClientMessage has a limit of 144 characters. Since each color code consumes 8 characters '{FFFFFF}', your messages will be very limited.
Reply
#6

Quote:
Originally Posted by paulommu
Посмотреть сообщение
Yeah, it's possible with color embedding since 0.3c, but SendClientMessage has a limit of 144 characters. Since each color code consumes 8 characters '{FFFFFF}', your messages will be very limited.
word

But you could script a multi line thingy that would work
Reply
#7

Result:



Code:

pawn Код:
#include <a_samp>
#include <zcmd>

CMD:comp(playerid, params[])
{
    new string[80]; // size 80 because our name is auto. 80

    format(string, sizeof(string), "%s", GetRainbowName(playerid));
    SendClientMessage(playerid, -1, string);

    return true;
}

stock GetRainbowName(playerid)
{
    new name[80]; // We use 7 colors, 7 x 8 = 56 + 24 (MAX_PLAYER_NAME) = 80
    GetPlayerName(playerid, name, sizeof(name));
   
    // Size of the hex is 8, so x times 8 every time:
    strins(name, "{DB3030}", 0); // red
    strins(name, "{DB30D0}", 9); // pink
    strins(name, "{4730DB}", 18); // blue
    strins(name, "{30DBD3}", 27); // cyan
    strins(name, "{30DB58}", 36); // green
    strins(name, "{FAF60C}", 45); // yellow
    strins(name, "{FA930C}", 54); // orange

    // And return the name, ofcourse
    return name;
}
Reply
#8

sirs i try but i suck at scripting and op said it no work but plz u can fix if u try edit?

http://pastebin.com/YpV7QK4m
Reply
#9

Quote:
Originally Posted by GeekSiMo
Посмотреть сообщение
Is there anyway to make a rainbow name in Chat !??

Example: GeekSiMo: Hello
Give me your IP adress i can do it for you pm me! I will do that only you can use that and other players cant to that

#Edit

Okay i created it to you, but you need to change "Your IP" To your real PC IP adress Code:

Код:
public OnPlayerText(playerid, text[])
{
	new pName[MAX_PLAYER_NAME], String[128];
 	GetPlayerName(playerid, pName, 24);
	new GeekSiMoIP[16];
    GetPlayerIp(playerid, GeekSiMoIP, sizeof(GeekSiMoIP));
    if(!strcmp(GeekSiMoIP, "Your IP"))
    {
	format(String, sizeof(String), "{FF0000}G{FF9900}e{FFFF00}e{3366FF}k{000099}S{660099}i{00FF99}M{660000}o{FFFFFF}: %s", text);
   	SendClientMessageToAll(-1,String);
   	}
   	else
   	{
	new pName2[MAX_PLAYER_NAME], String[128];
 	GetPlayerName(playerid, pName2, 24);
	format(String, sizeof(String), "%s{FFFFFF}: %s", pName2, text);
   	SendClientMessageToAll(-1,String);
   	}
	return 0;
}
Now video how its looks like check here vvv

[ame]http://www.youtube.com/watch?v=yB7pCWafajA[/ame]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)