#Selly Posted January 20, 2016 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
knightscript Posted January 20, 2016 Posted January 20, 2016 What do you mean with Hazard Lights? My Scripts: Custom vehicle by ACL Custom vehicle by Account
ViRuZGamiing Posted January 20, 2016 Posted January 20, 2016 yes there is; setVehicleLightState @knightscript, it's when you're parking your car somewhere temporarily. "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
Olle Risk Posted January 20, 2016 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. function be_remove() { printf("Too much gaming and too little sleep makes Olle wanna kill..."); be_remove(); }
Moderators IIYAMA Posted January 20, 2016 Moderators Posted January 20, 2016 https://wiki.multitheftauto.com/wiki/CreateLight Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
ViRuZGamiing Posted January 20, 2016 Posted January 20, 2016 https://wiki.multitheftauto.com/wiki/CreateLight Hazard lights are simply recreated with vehicle lights why use custom lights? Hazard lights: "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
Moderators IIYAMA Posted January 20, 2016 Moderators 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. Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
#Selly Posted January 25, 2016 Author Posted January 25, 2016 Sorry for the late reply , But can i do it with shaders ?
Moderators IIYAMA Posted January 25, 2016 Moderators Posted January 25, 2016 Sorry for the late reply, But can i do it with shaders ? If you understand shaders, YES else NO. Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
#Selly Posted January 25, 2016 Author 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; } }
#Selly Posted January 26, 2016 Author Posted January 26, 2016 ^ When i test the code i get a white tail light ^ that's what i want
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