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



Colors - miley1 - 17.05.2012

How do i change The Normal chat color If u press t


Re: Colors - TyThaBomb - 17.05.2012

Simply just add it onto OnPlayerText, make it send the message in a players color using GetPlayerColor and formatting a string.

Example:
pawn Код:
new textmsg[128], name[MAX_PLAYER_NAME], color;
            color = GetPlayerColor(playerid);
            GetPlayerName(playerid, name, sizeof(name));
            format(textmsg, sizeof(textmsg), " %s: %s", name, text);
            SendClientMessageToAll(color, textmsg);



Re: Colors - miley1 - 17.05.2012

I mean when you basicly write to someone and they see it only when u next to him I guess i was wrong , im using raven rp maybe u can help me now


Re: Colors - TyThaBomb - 17.05.2012

You can see if IsPlayerInRangeOfPoint of the person talking, that seems the best way, I don't do RP, so I can't be certain.


Re: Colors - miley1 - 17.05.2012

Ill ask Hellman Thanks anyway