13.05.2009, 21:06
how i can do that when i login ,
if i will get some part of the name it will change the color to me
?
if i will get some part of the name it will change the color to me
?
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 ? |
Originally Posted by MX_Master
if name uses in textdraws or gametexts, it parts can be colored by ~r~, ~y~, ~g~, ..
|
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; }
Originally Posted by borisblat
Quote:
just when i will login with my nick it will give me some color =\ |
new playername[20];
getplayername(playerid, playername, 20);
if(!strcmp("borisblat",playername, true)) {
setplayercolor(playerid, color_admin);
}
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; } |
Originally Posted by borisblat
this is not working, i am still orange =\
|
Originally Posted by borisblat
this is not working, i am still orange =\
|