ProxDetector problem -
tbedy - 20.12.2017
Well, i put in my script "famous" proxdetector for ranged IC Chat..
Код:
// proxdetector
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);
}
}
}
but it doesn't work... again we see messages all over server
Re: ProxDetector problem -
Argument - 20.12.2017
PHP код:
foreach(new i:Player)
Re: ProxDetector problem -
Kaperstone - 20.12.2017
Quote:
Originally Posted by Argument
PHP код:
foreach(new i:Player)
|
He can do that if he has the old standalone version
Код:
Deprecation
The "foreach (Player, i)" syntax, which was deprecated YEARS ago now gives a warning when used. The warning contains the text "using_deprecated_foreach_syntax". This is the only change that will affect regular users, which is why I made it non-breaking.
I'd suggest to print what the radius equals to.
Re: ProxDetector problem -
tbedy - 20.12.2017
I have new version of foreach...
so how to resolve this problem
Re: ProxDetector problem -
Kaperstone - 20.12.2017
I already wrote and Arguement has wrote the correct syntax for the newest version.
If you're not receiving "using_deprecated_foreach_syntax" error, then it might be that you're not using the latest.
If you use YSI
https://sampforum.blast.hk/showthread.php?tid=571159
if you don't
https://sampforum.blast.hk/showthread.php?tid=570868
then use the code that Arguement wrote, and if it still doesn't work
Quote:
print what the radius equals to.
|
if the radius is crazy then the radius is the fault.
Re: ProxDetector problem -
Argument - 20.12.2017
not foreach
PHP код:
for(new i, p_max = GetPlayerPoolSize(); i<= p_max; i++)
Re: ProxDetector problem -
tbedy - 22.12.2017
Код:
// proxdetector
stock ProxDetector(Float:radi, playerid, string[],color)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
foreach(new i:Player)
{
if(IsPlayerInRangeOfPoint(i,radi,x,y,z))
{
SendClientMessage(i,color,string);
}
}
}
... with updated new foreach 0.4.3
still doesn't work
Re: ProxDetector problem -
Sew_Sumi - 23.12.2017
Just going to mention, pretty sure this is a gutted out 'fixed' version of ProxDetector.
'Legendary' script had more than this, and more functionality.