Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Author: Johurt(ES.^, Edgar).
- Date: 23-01-2013.
- */
- stock GetVehicleAroundCoords(Float:x, Float:y, Float:z, Float:distance = 8.0)
- {
- new Float:vDistance = INVALID_PLAYER_ID, Float:nvDistance, vehicleid;
- for(new v; v < MAX_VEHICLES; v++)
- {
- if(GetVehicleModel(v) < 400) continue;
- nvDistance = GetVehicleDistanceFromPoint(v, x, y, z);
- if(nvDistance > distance) continue;
- if(vDistance == INVALID_PLAYER_ID) vDistance = nvDistance;
- if(vDistance > nvDistance) vDistance = nvDistance, vehicleid = v;
- }
- return vehicleid;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement