Jump to content

Handbrake sound.


DzMGZXL

Recommended Posts

Hey,

Welcome to Multi Theft Auto, I hope you enjoy your stay here.

In order to learn to script in Lua scripting language, I suggest you take some time to find the following topic useful for yourself. It contains links to tutorials and information regarding the use of the language in practice. This is essential in order to learn the basics of Lua and then work on your Multi Theft Auto related scripts.

» Lua tutorials, manuals

After you have familiarized yourself with Lua and know how to deploy basic code with it, you may move on to Multi Theft Auto specific scripting.

Up-to-date Multi Theft Auto scripting information, details and help can be found on the Multi Theft Auto Wiki site. Get yourself familiarized with the scripting features Multi Theft Auto offers you by reading articles of which links you can find on the right side of the Wiki front page under the Scripting heading:

You might also find the Tutorials board useful. These are tutorials, manuals and help topics written by community members. If Wiki seems a little bit too hardcore for you at the moment, checking this board should get you started easily.

Feel free to also use our available chatting channels to ask questions and get help in general. These can be found at the IRC Channel Wiki article. Make sure to search for an answer on your preferred search engine first, and through the forum search feature. This way you can find solutions faster and will keep our channels clean of already answered questions!

If you have code which you can post on your topic, that would make it easier for helpers to get a solution for you faster. Keep in mind that we are a public forum and we can only fix your code if you are willing to post it on your topic. This way we give you help and eventually a solution, and if someone else is facing the same issue later they can find a solution to the problem from your topic.

I hope this got you started up!

Link to comment

one example:

--server 
addCommandHandler("handbrake", 
function(p) 
if(isPedInVehicle(p))then 
triggerClientEvent("onHandbrakeSoundStart",p) 
end 
end) 
  
--client 
addEvent("onHandbrakeSoundStart",true) 
addEventHandler("onHandbrakeSoundStart",root, 
function() 
local x,y,z = getElementPosition(source) 
playSound3D("mysong.mp3",x,y,z) 
end) 

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