SA-MP Forums Archive
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(playerid52102.42902257.430911.0234) || IsPlayerInRangeOfPoint(playerid52368.86571983.394010.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(playerid52102.42902257.430911.0234) || IsPlayerInRangeOfPoint(playerid52368.86571983.394010.8203)) 
or
I can't believe, it's working
Thanks, bro!