Need help with ProxDetector - 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: Need help with ProxDetector (
/showthread.php?tid=448569)
Need help with ProxDetector -
cecko1235 - 04.07.2013
Hello, buddies. I am using this Prox Detector
Код:
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);
}
}
}
and this is my OnPlayerText
Код:
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);
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?
Re: Need help with ProxDetector -
cecko1235 - 05.07.2013
Bump..