Jump to content

AddVehicleSiren


tim260

Recommended Posts

im having trouble with addvehicle siren, i couldnt get the lights to work so i tried this :

addEventHandler("onVehicleEnter",root,function(player,seat) 
   if(player)and(seat==0)then 
      addVehicleSirens(source,1,1) 
      setVehicleSirens(source,1,3,0,0,1,255,0,0,255,1.0) 
      bindKey(player,"g","up",getSiren,source) 
   end 
end) 
  
function getSiren(player,button,state,vehicle) 
   local sirenData = getVehicleSirens(vehicle) 
   outputChatBox("Here's the properties of your vehicle sirens: Red,Green,Blue: "..tostring(sirenData[1][0])..","..tostring(sirenData[1][1])..","..tostring(sirenData[1][2])..", X,Y,Z: "..tostring(sirenData[1][3])..","..tostring(sirenData[1][4])..","..tostring(sirenData[1][5])..", minAlpha: "..tostring(sirenData[1][6])..".",player) 
end 
  
addEventHandler("onVehicleExit",root,function(player,seat) 
   if(player)and(seat==0)then 
      removeVehicleSirens(source) 
      unbindKey(player,"g","up",getSiren) 
   end 
end) 

BUT :P im gettin everything Nil again RGB and XYZ all nil :S

btw got that script from : http://wiki.multitheftauto.com/wiki/GetVehicleSirens

Edited by Guest
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...