SA-MP Forums Archive
Help me out plz In client message - 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)
+--- Thread: Help me out plz In client message (/showthread.php?tid=648120)



Help me out plz In client message - Jokers98s - 16.01.2018

Код:
        format(str, 256, "{FFFF66}[VIP]%s [%d]: %s", pName1, playerid, text);
        SendMessageToAll(playerid, GetPlayerColor(playerid), str);
i need only [VIP] in {FFFF66} color
and %s[%d]:%s in player color.
now {FFFF66} color only get displayed

Help me plz


Re: Help me out plz In client message - RIDE2DAY - 16.01.2018

This should do the job:
PHP код:
format(str256"{FFFF66}[VIP]{%06x}%s [%d]: %s"GetPlayerColor(playerid) >>> 8pName1playeridtext);
SendClientMessageToAll(-1str); 
Make sure you use SetPlayerColor before using GetPlayerColor, check the important note here:
https://sampwiki.blast.hk/wiki/GetPlayerColor