help | Part of name - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help | Part of name (
/showthread.php?tid=77707)
help | Part of name -
borisblat - 13.05.2009
how i can do that when i login ,
if i will get some part of the name it will change the color to me
?
Re: help | Part of name -
Think - 13.05.2009
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)
Re: help | Part of name -
MX_Master - 13.05.2009
if name uses in textdraws or gametexts, it parts can be colored by ~r~, ~y~, ~g~, ..
Re: help | Part of name -
borisblat - 13.05.2009
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?
Re: help | Part of name -
borisblat - 13.05.2009
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 =\
Re: help | Part of name -
MX_Master - 13.05.2009
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;
}
Re: help | Part of name -
Think - 13.05.2009
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
Re: help | Part of name -
borisblat - 13.05.2009
this is not working, i am still orange =\
Re: help | Part of name -
Think - 13.05.2009
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.
Re: help | Part of name -
MX_Master - 13.05.2009
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