Jump to content

AddVehicleSiren


tim260

Recommended Posts

Posted (edited)

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 : https://wiki.multitheftauto.com/wiki/GetVehicleSirens

Edited by Guest
Posted

so im using the right version is this an MTA bug ?

Multi Theft Auto v1.3-release-4209 
Copyright (C) 2003 - 2012 Multi Theft Auto 
MTA:SA Server v1.3-release-4209 

Posted

You're using 1.3, you need 1.3.1

Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS.

Developer and owner of

https://projectbea.st - Project Beast
Posted
Version 1.3.1 isn't released yet, and the nightly is for 1.4. So you will have to wait until it's released.

How come i saw the lights yesterday and now i dont anymore ?

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