Dimos7 Posted February 7, 2017 Share Posted February 7, 2017 (edited) Hello guys i am try put sirenlight on lightbar on towtruck the problem is make but i don;t know how can help me also there not error or warning for this function vehicleSirens(theVehicle) if isElement(theVehicle) and getElementType(theVehicle) == "vehicle" then if getVehicleName(theVehicle) == "Towtruck" then setVehicleSirens(theVehicle, 1, 0, -1.6, 1.1, 255, 0, 0) setVehicleSirens(theVehicle, 2, 0.7, -1.6, 1.1, 0, 35, 0) setVehicleSirens(theVehicle, 3, 1.4, -1.6, 1.1, 255, 0, 0) addVehicleSirens(theVehicle, 1, 2) if not getVehicleSirensOn(theVehicle) then setVehicleSirensOn(theVehicle, true) else setVehicleSirensOn(theVehicle, false) end end end end addCommandHandler("siren", vehicleSirens) ake siren without sound any help? Edited February 7, 2017 by Dimos7 Link to comment
nikitafloy Posted February 7, 2017 Share Posted February 7, 2017 https://community.multitheftauto.com/index.php?p=resources&s=details&id=5030 Link to comment
Dimos7 Posted February 8, 2017 Author Share Posted February 8, 2017 that is for light not want that Link to comment
pa3ck Posted February 8, 2017 Share Posted February 8, 2017 https://wiki.multitheftauto.com/wiki/AddVehicleSirens Last argument, silentFlag Link to comment
Dimos7 Posted February 8, 2017 Author Share Posted February 8, 2017 function vehicleSirens(theVehicle) if isElement(theVehicle) and getElementType(theVehicle) == "vehicle" then if getVehicleName(theVehicle) == "Towtruck" then setVehicleSirens(theVehicle, 1, 0, -1.6, 1.1, 255, 0, 0) setVehicleSirens(theVehicle, 2, 0.7, -1.6, 1.1, 0, 35, 0) setVehicleSirens(theVehicle, 3, 1.4, -1.6, 1.1, 255, 0, 0) addVehicleSirens(theVehicle, 1, 2, true, false, true, true) if not getVehicleSirensOn(theVehicle) then setVehicleSirensOn(theVehicle, true) else setVehicleSirensOn(theVehicle, false) end end end end addCommandHandler("siren", vehicleSirens) not working why not error or warnings? Link to comment
Dimos7 Posted February 8, 2017 Author Share Posted February 8, 2017 (edited) nvm i fix it ty Edited February 8, 2017 by Dimos7 Link to comment
Dimos7 Posted February 8, 2017 Author Share Posted February 8, 2017 how to make it if h press and siren is on silent go off? Link to comment
Dimos7 Posted February 10, 2017 Author Share Posted February 10, 2017 function vehicleSirens(thePlayer) if isPedInVehicle(thePlayer) then theVehicle = getPedOccupiedVehicle(thePlayer) if getPedOccupiedVehicleSeat(thePlayer) == 0 then if getVehicleName(theVehicle) == "Towtruck" then setVehicleSirens(theVehicle, 1, -0.6, -0.5, 1.4, 255, 0, 0) setVehicleSirens(theVehicle, 2, 0, -0.5, 1.4, 255, 153, 0) setVehicleSirens(theVehicle, 3, 0.6, -0.5, 1.4, 255, 0, 0) addVehicleSirens(theVehicle, 3, 2, true, false, true, true) if not getVehicleSirensOn(theVehicle) then setVehicleSirensOn(theVehicle, true) else setVehicleSirensOn(theVehicle, false) end end end end end addCommandHandler("siren", vehicleSirens) guys my script not working on some gametime hours why? 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