IsInRangeofDynamicArea
#3

Quote:
Originally Posted by Calisthenics
Посмотреть сообщение
Im looking for a function to check if a point is in range, not a player

I made
Код:
stock GetClosestStreetEx(Float:X, Float:Y, Float:Z, Float:range)
{
    new
        Float:distance = range,
        Float:curdistance,
		closestStreet = -1;

    for(new s=1; s <= loadedStreets; s++){
        Streamer_GetDistanceToItem(X, Y, Z, 6, Street[s][streetArea], curdistance, 2);
		printf("%f, %f", curdistance, range);
        if(curdistance < distance)
        {
            closestStreet = s;
            distance = curdistance;
        }

    }
    return closestStreet;
}
But its not working properly, when standing ON the area (tested with on leave and enter area publics), it says im too far away while I am literally on it.
Reply


Messages In This Thread
IsInRangeofDynamicArea - by Stefand - 23.07.2018, 09:40
Re: IsInRangeofDynamicArea - by Calisthenics - 23.07.2018, 14:39
Re: IsInRangeofDynamicArea - by Stefand - 25.07.2018, 20:39
Re: IsInRangeofDynamicArea - by NaS - 25.07.2018, 20:49
Re: IsInRangeofDynamicArea - by Stefand - 25.07.2018, 21:38
Re: IsInRangeofDynamicArea - by 0x88 - 25.07.2018, 21:44
Re: IsInRangeofDynamicArea - by NaS - 25.07.2018, 22:24

Forum Jump:


Users browsing this thread: 4 Guest(s)