Is this possible?
#7

Quote:
Originally Posted by Vince
Посмотреть сообщение
That doesn't work at all (edit: Burridge was faster). You need to repeat the entire IsPlayerInRangeOfPoint line. But if you have more than two or three sets of coordinates then I recommend using an array to keep your code neat and readable. So something like:
PHP код:
static const Float:coords[][3] = {
    {
x1y1z1},
    {
x2y2z2},
    {
x3y3z3},
    {
x4y4z4// no comma after last one
};
for(new 
isizeof(coords); i++)
{
    if(
IsPlayerInRangeOfPoint(playerid7.0coords[i][0], coords[i][1], coords[i][2])
    {
        
// do stuff
        
break; // this is here to stop the needless searching of the other locations as soon as one is found
    
}

Thanks dude
Reply


Messages In This Thread
Is this possible? - by akib - 25.05.2017, 07:30
Re: Is this possible? - by RxErT - 25.05.2017, 07:35
Re: Is this possible? - by akib - 25.05.2017, 07:38
Re: Is this possible? - by asri - 25.05.2017, 07:53
Re: Is this possible? - by Burridge - 25.05.2017, 08:47
Re: Is this possible? - by Vince - 25.05.2017, 08:48
Re: Is this possible? - by akib - 25.05.2017, 09:04
Re: Is this possible? - by CheezIt - 25.05.2017, 19:20
Re: Is this possible? - by saffierr - 26.05.2017, 07:17
Re: Is this possible? - by DRIFT_HUNTER - 26.05.2017, 08:59

Forum Jump:


Users browsing this thread: 3 Guest(s)