If isplayerinrangeofpoint - 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: If isplayerinrangeofpoint (
/showthread.php?tid=622718)
If isplayerinrangeofpoint -
Oficer - 25.11.2016
Код:
CMD: testing(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 5, 2102.4290, 2257.4309, 11.0234)) //(playerid, id, x, y, z)
{
ShowModelSelectionMenu(playerid, skinlist, "skins");
}
else
{
SendClientMessage(playerid, 0xFF3333FF, "Error");
}
return 1;
}
How I can add more IsPlayerInRangeOfPoint ? for example: if(IsPlayerInRangeOfPoint(playerid, 5, 2368.8657, 1983.3940, 10.8203)) ?
Re: If isplayerinrangeofpoint -
ISmokezU - 25.11.2016
Could make an array with all of the locations then check in that one state if their in range of the positions in the array else ...
Re: If isplayerinrangeofpoint -
Alvitr - 25.11.2016
Quote:
Originally Posted by Oficer
Код:
CMD: testing(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 5, 2102.4290, 2257.4309, 11.0234)) //(playerid, id, x, y, z)
{
ShowModelSelectionMenu(playerid, skinlist, "skins");
}
else
{
SendClientMessage(playerid, 0xFF3333FF, "Error");
}
return 1;
}
How I can add more IsPlayerInRangeOfPoint ? for example: if(IsPlayerInRangeOfPoint(playerid, 5, 2368.8657, 1983.3940, 10.8203)) ? 
|
use ||
PHP код:
if(IsPlayerInRangeOfPoint(playerid, 5, 2102.4290, 2257.4309, 11.0234) || IsPlayerInRangeOfPoint(playerid, 5, 2368.8657, 1983.3940, 10.8203))
or
Quote:
Originally Posted by ISmokezU
Could make an array with all of the locations then check in that one state if their in range of the positions in the array else ...
|
Re: If isplayerinrangeofpoint -
Oficer - 25.11.2016
Quote:
Originally Posted by Alvitr
use ||
PHP код:
if(IsPlayerInRangeOfPoint(playerid, 5, 2102.4290, 2257.4309, 11.0234) || IsPlayerInRangeOfPoint(playerid, 5, 2368.8657, 1983.3940, 10.8203))
or
|
I can't believe, it's working

Thanks, bro!