optimize code
#1

I made a code, but want to let him 100 percent functional, the problem is that when I approach a vehicle it checks another vehicle farther than what I desire, sometimes function checks as far even though vehicle one in front of you .. how can I fix it?

PHP Code:
public PlacaVeiculoPerto(playerid)
{
    for( new 
iMAX_VEHICLESi++) {
        new 
Float:Pos[3];
        
GetVehiclePos(iPos[0], Pos[1], Pos[2]);
        if(
IsPlayerInRangeOfPoint(playerid7.0Pos[0], Pos[1], Pos[2])) {
            return 
i;
        }
    }
    return 
0;

Reply


Messages In This Thread
optimize code - by JoshNudock - 22.06.2015, 14:21
Re: optimize code - by CoaPsyFactor - 22.06.2015, 14:32
Re: optimize code - by JoshNudock - 22.06.2015, 19:33
AW: optimize code - by Mencent - 22.06.2015, 19:34
Re: AW: optimize code - by JoshNudock - 22.06.2015, 19:38

Forum Jump:


Users browsing this thread: 1 Guest(s)