#Selly Posted January 20, 2016 Share Posted January 20, 2016 Hello, Is there functions to make hazard lights in mta sa ? , Cause i saw it on a server, and if there is can you give me the functions to make them Link to comment
knightscript Posted January 20, 2016 Share Posted January 20, 2016 What do you mean with Hazard Lights? Link to comment
ViRuZGamiing Posted January 20, 2016 Share Posted January 20, 2016 yes there is; setVehicleLightState @knightscript, it's when you're parking your car somewhere temporarily. Link to comment
Olle Risk Posted January 20, 2016 Share Posted January 20, 2016 If this is the server you saw it in: mtasa://lon.404rq.com:22005 then you'll find the script here: https://github.com/404rq/GTW-RPG/tree/master/%5Bresources%5D/GTWturnsignals setVehicleLightState is one way of doing it but it's not perfect as all vehicles doesn't have their light ID's positioned in the same corners. The other way is to make your own lights, no idea how to do that tho. Link to comment
Moderators IIYAMA Posted January 20, 2016 Moderators Share Posted January 20, 2016 https://wiki.multitheftauto.com/wiki/CreateLight Link to comment
ViRuZGamiing Posted January 20, 2016 Share Posted January 20, 2016 https://wiki.multitheftauto.com/wiki/CreateLight Hazard lights are simply recreated with vehicle lights why use custom lights? Hazard lights: Link to comment
Moderators IIYAMA Posted January 20, 2016 Moderators Share Posted January 20, 2016 https://wiki.multitheftauto.com/wiki/CreateLight Hazard lights are simply recreated with vehicle lights why use custom lights? Hazard lights: Because it gives a nice effect when doing that. Link to comment
#Selly Posted January 25, 2016 Author Share Posted January 25, 2016 Sorry for the late reply , But can i do it with shaders ? Link to comment
Moderators IIYAMA Posted January 25, 2016 Moderators Share Posted January 25, 2016 Sorry for the late reply, But can i do it with shaders ? If you understand shaders, YES else NO. Link to comment
#Selly Posted January 25, 2016 Author Share Posted January 25, 2016 myShader = dxCreateShader( "Shader.fx" ) Texture = dxCreateTexture("Skin.png") dxSetShaderValue(myShader, "Skin", Texture) addEventHandler("onClientVehicleEnter", root, function(thePlayer, seat) local theVehicle = source if seat == 0 and thePlayer == localPlayer then engineApplyShaderToWorldTexture( myShader, "vehiclelightson128", theVehicle ) if ( isPedInVehicle ( thePlayer ) ) and ( getVehicleOverrideLights ( getPedOccupiedVehicle ( thePlayer ) ) ~= 2 ) then setVehicleOverrideLights ( getPedOccupiedVehicle ( thePlayer ), 2 ) else setVehicleOverrideLights ( getPedOccupiedVehicle ( thePlayer ), 1 ) end end end ) texture gTexture; technique hello { pass P0 { Texture[0] = gTexture; } } Link to comment
#Selly Posted January 26, 2016 Author Share Posted January 26, 2016 ^ When i test the code i get a white tail light ^ that's what i want 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