04.07.2013, 22:27
Hello, buddies. I am using this Prox Detector
and this is my OnPlayerText
How I can make when someone is close to me and I am writing in the chat, to show him the text in white, but when he is a little further to appear the same text in gray?
Код:
stock ProxDetector(Float:radi, playerid, string[],color)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
foreach(Player,i)
{
if(IsPlayerInRangeOfPoint(i,radi,x,y,z))
{
SendClientMessage(i,color,string);
}
}
}
Код:
new message[128]; format(message, sizeof(message), "%s Says: %s", GetName(playerid), text); ProxDetector(30.0, playerid, message, COLOR_WHITE); ProxDetector(60.0, playerid, message, COLOR_GREY);

