help | Part of name
#1

how i can do that when i login ,
if i will get some part of the name it will change the color to me
?
Reply
#2

Quote:
Originally Posted by borisblat
how i can do that when i login ,
if i will get some part of the name it will change the color to me
?
cant change parts of names. only whole names (SetPlayerColor)
Reply
#3

if name uses in textdraws or gametexts, it parts can be colored by ~r~, ~y~, ~g~, ..
Reply
#4

Emm =\

if i login now to my server id 0 gets orange color
id 1 gets purple etc...

but i want that if i will login with some specific nick or part of nick it will give him another color

is it possible?
Reply
#5

Quote:
Originally Posted by MX_Master
if name uses in textdraws or gametexts, it parts can be colored by ~r~, ~y~, ~g~, ..
i don't mean that .. i think
just when i will login with my nick it will give me some color =\
Reply
#6

i think you mean something like this

Код:
public OnPlayerConnect ( playerid )
{
	new playerName[24];
	GetPlayerName( playerid, playerName, 24 );
	
	if ( strcmp( playerName, "RedNick", true ) == 0 ) SetPlayerColor( playerid, 0xFF0000AA );

	if ( strfind( playerName, "Green", true ) != -1 ) SetPlayerColor( playerid, 0x339966AA );

	return 1;
}
Reply
#7

Quote:
Originally Posted by borisblat
Quote:
Originally Posted by MX_Master
if name uses in textdraws or gametexts, it parts can be colored by ~r~, ~y~, ~g~, ..
i don't mean that .. i think
just when i will login with my nick it will give me some color =\
ah i get it, like this:

pawn Код:
new playername[20];
getplayername(playerid, playername, 20);
if(!strcmp("borisblat",playername, true)) {
setplayercolor(playerid, color_admin);
}

Quote:
Originally Posted by MX_Master
i think you mean something like this

Код:
public OnPlayerConnect ( playerid )
{
	new playerName[24];
	GetPlayerName( playerid, playerName, 24 );
	
	if ( strcmp( playerName, "RedNick", true ) == 0 ) SetPlayerColor( playerid, 0xFF0000AA );

	if ( strfind( playerName, "Green", true ) != -1 ) SetPlayerColor( playerid, 0x339966AA );

	return 1;
}
you were like 3 sec before me you lucky :P
Reply
#8

this is not working, i am still orange =\
Reply
#9

Quote:
Originally Posted by borisblat
this is not working, i am still orange =\
fill in your own name dont expect us to know your ingame names.
Reply
#10

Quote:
Originally Posted by borisblat
this is not working, i am still orange =\
yea, just make your changes in example and test again until you see what you want

also you can have some problems if you using example code in filterscript, but gamemode uses another nick coloring system
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)