adamb Posted May 13, 2013 Share Posted May 13, 2013 So, i wrote this, it is basically supposed to stop the NPCHLC traffic vehicle's engines off. for k,v in ipairs(getElementsByType("player")) do bindKey(v, "n", "down", "ts") end function onPlayerTarget( thePlayer ) local target = getCameraTarget ( thePlayer ) if ( getElementType ( target ) == "vehicle" ) then setVehicleEngineState ( target, false ) outputChatBox ( "Walk up to the driver side window", source ) end end addCommandHandler("ts", onPlayerTarget) Tho It doesn't work, no errors tho. Any ideas? Link to comment
adamb Posted May 13, 2013 Author Share Posted May 13, 2013 Bump. I figured two functions i needed, CapY helped me, tho he couldn't tell me how i'm missing them. https://wiki.multitheftauto.com/wiki/ProcessLineOfSight https://wiki.multitheftauto.com/wiki/Ge ... enPosition can someone give me a hand? Link to comment
CapY Posted May 13, 2013 Share Posted May 13, 2013 That code is so wrong, I just gave you the functions... See, if you want to turn off the vehicle engine while having your ped looking at one of them, use these two functions above. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now