Help with OnPlayerText
#3

As you can see here, the -1 is color white.
pawn Код:
format(str,sizeof(str),"[%02d:%02d:%02d] %s [%d]: %s",hours,minutes,seconds,PlayerName(playerid),playerid,text);
        SendClientMessageToAll( -1, str); //
Therefore it will send the message in white, use GetPlayerColor, and put it instead of -1.
You can always show the rest of the message in white if you want it by putting {FFFFFF} in the string format, whereever you want it to be white.

So replace the above with this.
pawn Код:
format(str,sizeof(str),"[%02d:%02d:%02d] %s [%d]: {FFFFFF}%s",hours,minutes,seconds,PlayerName(playerid),playerid,text);
        SendClientMessageToAll(GetPlayerColor, str);
Or ofcourse remove the {FFFFFF} if you do not want white color after the name. This works with other colors too, as long as you put them inside such boxes: { }
Reply


Messages In This Thread
Help with OnPlayerText - by Ercha - 01.01.2015, 21:58
Re: Help with OnPlayerText - by AndySedeyn - 01.01.2015, 22:03
Re: Help with OnPlayerText - by CalvinC - 01.01.2015, 22:38
Re: Help with OnPlayerText - by ATGOggy - 02.01.2015, 06:02

Forum Jump:


Users browsing this thread: 1 Guest(s)