SA-MP Forums Archive
OnPlayerText - 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: OnPlayerText (/showthread.php?tid=389384)



OnPlayerText - benel1 - 01.11.2012

pawn Код:
public OnPlayerText(playerid, text[])
{
    new Str[256];
    format(Str, sizeof(Str), "%s: %s [id: %d | %s]", GetName(playerid), text, playerid, DOF2_GetString(PFile(playerid),"Tag"));
    SendClientMessageToAll(-1, Str);
    return 0;
}
How i do random color for the player name ?


Re: OnPlayerText - Finn - 01.11.2012

With a little searching I found the following:
https://sampwiki.blast.hk/wiki/ColorFix
https://sampwiki.blast.hk/wiki/GetPlayerColor

Taken from wiki:
pawn Код:
SendClientMessage(playerid, GetPlayerColor(playerid), "This is your color :)");