optimize code
#4

Hello!

You forgot the Float:-Tag.
PHP Code:
stock PlacaVeiculoPerto(playerid)
{
    new 
Float:distance 10.0FloatcurrentDistance 11.0vehicleid 0Float:Pos[3];
    for(new 
iMAX_VEHICLESi++)
    {
        
GetVehiclePos(iPos[0], Pos[1], Pos[2]);
        
currentDistance GetPlayerDistanceFromPoint(playeridPos[0], Pos[1], Pos[2]);
        if(
currentDistance <= 7.0 && currentDistance distance) {
            
vehicleid i;
            
distance currentDistance;
        }
    }
    return 
vehicleid;


- Mencent
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)