Jump to content

Siren help


Dimos7

Recommended Posts

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 by Dimos7
Link to comment
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
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

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...