Jump to content

EMP Project


mjau

Recommended Posts

Hi i will most likely ask very much in this topic over the time cuz im working wiht an EMP Project who can disable engine of a vehicle

K over to the question i need an answer on before i can continue

How can i make the script automaticly find the nearest player in the driver seat of a vehicle aircrafts also?

Link to comment
function off(player) 
local car =  getPedOccupiedVehicle(player) 
 setVehicleEngineState (  car, false ) 
end 
addCommandHandler("engineoff",off) 

next time try to make a part of script and we will help you whit errors

you wana find the nearlest player form a car/plane

Link to comment

try to use

getDistanceBetweenPoints3D() 
getElementsByType ( "player" )   
   

then first object are you (i think you need nearlest car form you ) and secound are other players and then check for each player if has a vehicle and if yes then check distance and if is smaler then ..

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...