Desaster Posted October 20, 2013 Share Posted October 20, 2013 I couldn't specify the seat of the driver I tryed this and many other this but it won't work help me pls function engineSwitch1 () if (seat == 0) then -- the error is here if (isPedInVehicle (source)) then local veh = getPedOccupiedVehicle (source) if (getVehicleEngineState (veh) == true) then setVehicleEngineState (veh, false) outputChatBox ("Vehicle shutted down.", source, 255, 0, 0) elseif (getVehicleEngineState (veh) == false) then setVehicleEngineState (veh, true) outputChatBox ("Vehicle started.", source, 255, 0, 0) end else outputChatBox ("You aren't in a vehicle!", source, 255, 0, 0) end else outputChatBox ("You aren't the Driver of this Vehicle!", source, 255, 0, 0) end end addEvent("engenieSwitch1",true) addEventHandler("engenieSwitch1",getRootElement(),engineSwitch1) Link to comment
pa3ck Posted October 20, 2013 Share Posted October 20, 2013 getVehicleController or the 'onPlayerVehicleEnter' event do the same ( vehicle theVehicle, int seat, player jacked ) 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