EACH WORD DIFFERENT COLLOR
#1

Hi guys! Can somebody tell me how can i color the firs word from a string? Like:

pawn Код:
%s joined the server (Test joined the server)
but Test have to look like Test color into blue the first word from his name!
Reply
#2

For example, this is red {F81414} and this is white color {FFFFFF}

This:
pawn Код:
SendClientMessage(playerid, 0xFFFFFFFF, "{F81414}H{FFFFFF}e{F81414}l{FFFFFF}l{F81414}o");
Will show this in-game:

Hello

Actualy the black letters are supposed to be white, but i made them black so you read it as forums background is white..
Reply
#3

Color Embedding
Reply
#4

did you read the title? i want to color with {ff0000} for ex the first word from GetPlayer name! It's a string! and i want to automatic color the first word or the seccond from his name Now you understand?

OFF: i have servers in mysql/sql and much other things and you told me how to color a text?)
Reply
#5

Quote:
Originally Posted by Anonym2009
Посмотреть сообщение
did you read the title? i want to color with {ff0000} for ex the first word from GetPlayer name! It's a string! and i want to automatic color the first word or the seccond from his name Now you understand?

OFF: i have servers in mysql/sql and much other things and you told me how to color a text?)
This attitude wont take you anywhere...
I don't know if it's possible to do such thing, but, i bet you have to get player name, check if it has a FirstName_LastName format, devide it, and paint it with the colors you want...
Reply
#6

Sorry for that i was angry i need a function which can find the first character from the string
Reply
#7

https://sampwiki.blast.hk/wiki/Strins

pawn Код:
strins(name, "{xxxxxx}", 1); // Color of rest of string
strins(name, "{xxxxxx}", 0); // Color of first character
Reply
#8

And for the second ?)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)