SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 13/10/2012, 09:05 AM   #1
Maniek
Big Clucker
 
Maniek's Avatar
 
Join Date: Apr 2007
Posts: 192
Reputation: 2
Question Rainbow colors name convert to text

Code:
//top
new PlayerRainbowColours[63] = {
/*OKStyle*/ 000022, 000044, 000066, 000088, 0000AA, 0000CC, 0000EE,
002200, 002222, 002244, 002266, 002288, 0022AA, 0022CC, 0022EE,
004400, 004422, 004444, 004466, 004488, 0044AA, 0044CC, 0044EE,
006600, 006622, 006644, 006666, 006688, 0066AA, 0066CC, 0066EE,
008800, 008822, 008844, 008866, 008888, 0088AA, 0088CC, 0088EE,
00AA00, 00AA22, 00AA44, 00AA66, 00AA88, 00AAAA, 00AACC, 00AAEE,
00CC00, 00CC22, 00CC44, 00CC66, 00CC88, 00CCAA, 00CCCC, 00CCEE,
00EE00, 00EE22, 00EE44, 00EE66, 00EE88, 00EEAA, 00EECC, 00EEEE,
};
Code:
//OnPlayerText
new colour = PlayerRainbowColours(playerid);
	if(gTeam[playerid] == TEAM_DRIVER)
    {
		SendClientMessageToAllEx(COLOUR_WHITE, ""orange"[Driver]"{colour}"%s (%d): "white"%s", GetPName(playerid), playerid, text);
    }
How to properly write the code?

Edit://

now I change code to this:
Code:
//OnPlayerText
	if(gTeam[playerid] == TEAM_DRIVER)
    {
		SendClientMessageToAllEx(COLOUR_WHITE, ""orange"[Driver]{%06x}%s (%d): "white"%s", GetPlayerColor(playerid) >>> 8, GetPName(playerid), playerid, text);
    }
Now it's better but I see orange text and black nick. Why?

Last edited by Maniek; 13/10/2012 at 09:40 AM.
Maniek is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert numbers to text milanosie Scripting Help 6 07/06/2012 04:14 PM
Dialog Text Colors Passout Scripting Help 7 22/11/2011 04:57 AM
Text draw colors Cameltoe Help Archive 1 20/08/2010 06:32 PM


All times are GMT. The time now is 10:05 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.