ville Posted February 25, 2015 Posted February 25, 2015 Is there any way to replace police sirens wit hother sirens? I have mp3 files for the both siren, what i have to do now? Check out my mta server :3, Freeroam, drifting, CnR, missions and much things to do
Enargy, Posted February 25, 2015 Posted February 25, 2015 getElementPosition getPedOccupiedVehicle attachElementToElement triggerClientEvent getLocalPlayer playSound3D bindKey - Inactivo.
ville Posted February 25, 2015 Author Posted February 25, 2015 Mm maybe too hard for me :Dd Check out my mta server :3, Freeroam, drifting, CnR, missions and much things to do
JR10 Posted February 25, 2015 Posted February 25, 2015 Try something out first and then we can help you with your code. Check the community for examples. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
ville Posted February 26, 2015 Author Posted February 26, 2015 players = getElementsByType("player") addEventHandler("onResourceStart", resourceRoot, function() for index,player in ipairs(players) do bindKey(player, "M","down", sirens) end end) function sirens(player) local veh = getPedOccupiedVehicle(player) if (veh) then addVehicleSirens(veh,1,1) if not getVehicleSirensOn (veh) then setVehicleSirensOn (veh, true) else setVehicleSirensOn (veh, false) removeVehicleSirens(veh) end end end I dont know.. I have 2 siren files need to replace like first when u turn firens on and the other siren when u pressing siren button Check out my mta server :3, Freeroam, drifting, CnR, missions and much things to do
Enargy, Posted February 26, 2015 Posted February 26, 2015 the function called sirens use triggerClientEvent instead of setVehicleSirensOn and add in the clientside playSound3D and stopSound - Inactivo.
ville Posted February 27, 2015 Author Posted February 27, 2015 Impossibru Check out my mta server :3, Freeroam, drifting, CnR, missions and much things to do
Addlibs Posted February 27, 2015 Posted February 27, 2015 Disable the original sounds with setWorldSoundEnabled and then make a client side check (setTimer or onClientRender in conjunction with getTickCount), if getVehicleSirensOn returns true, playSound3D. As soon as it stops returning true, stopSound or destroyElement PS. This was already suggested (not in as much detail) in another topic - use the search first next time viewtopic.php?f=91&t=85516 Previously known as MrTasty.
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