13.03.2012, 10:51
i bet he wont need a distance check looped for all vehicles. who will exit his car in angel pine, walk up to KACC fuels, and try to open the trunk 5 hours later, after walking 10 miles?
setting the last entered vehicle is the way to go with.
if the vehicleid got stored in LastVehicle[playerid], then this variable can be used with GetVehiclePos(LastVehicle[playerid],X,Y,Z), and then checked for being IsPlayerInRangeOfPoint(playerid,5,X,Y,Z). no need for any loops.
setting the last entered vehicle is the way to go with.
if the vehicleid got stored in LastVehicle[playerid], then this variable can be used with GetVehiclePos(LastVehicle[playerid],X,Y,Z), and then checked for being IsPlayerInRangeOfPoint(playerid,5,X,Y,Z). no need for any loops.