Tonnzza Posted October 24, 2014 Posted October 24, 2014 Is it possible to put the siren on button M? not horn
iPanda Posted October 24, 2014 Posted October 24, 2014 Yes, you have use this functions: bindKey setVehicleSirens setVehicleSirensOn
Tonnzza Posted October 24, 2014 Author Posted October 24, 2014 I am new in scripting. How i make it from those functions?
Enargy, Posted October 24, 2014 Posted October 24, 2014 I am new in scripting. How i make it from those functions? server.lua players = getElementsByType("player") addEventHandler("onResourceStart", resourceRoot, function() for index,player in ipairs(players) do bindKey(player, "M","down", sirens) end end) function sirens(player) local veh = getPedOccupiedVehicle(player) if (veh) then addVehicleSirens(veh,1,1) if not getVehicleSirensOn (veh) then outputChatBox("Sirens: ON", player, 0, 255, 0) setVehicleSirensOn (veh, true) else outputChatBox("Sirens: OFF", player, 255, 0, 0) setVehicleSirensOn (veh, false) removeVehicleSirens(veh) end end end
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