Krayzee Posted August 16, 2011 Posted August 16, 2011 How is it that I change the audio for the 3, 2, 1 countdown in race mode? It might not be a scripting question but I don't know
JR10 Posted August 16, 2011 Posted August 16, 2011 Download it, and replace the one in the resource. 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
Krayzee Posted August 16, 2011 Author Posted August 16, 2011 Download it, and replace the one in the resource. I can't find the resource that holds the files.
JR10 Posted August 16, 2011 Posted August 16, 2011 Lol, the basemode right?, search for basemode and replace the count down in it. 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
Krayzee Posted August 16, 2011 Author Posted August 16, 2011 It's on race, hence I'm looking for the countdown timer. I've managed to replace the images that show up but I can't find the audio files.
JR10 Posted August 16, 2011 Posted August 16, 2011 The sound of the race, isn't a file, it's with playSoundFrontEnd, which will play a sound in GTA. To replace it you will need scripting knowledge, and replace playSoundFrontEnd with playSound. 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
Krayzee Posted August 16, 2011 Author Posted August 16, 2011 Could you please give me guidance on how to script it? I know how to get it to recognise the sound files but I don't know how to do the .lua part. Is there a link anywhere? I've tried using the search bar but all I get is deathmatch help and nothing about race.
SDK Posted August 16, 2011 Posted August 16, 2011 Here are the playSoundFrontEnd hooks in race: http://code.google.com/p/mtasa-resource ... er.lua#362 race_server.lua, line 365-368 edit: Race is a complicated gamemode If you want a custom sound to be played, it would be like this: g_RaceStartCountdown:addClientHook(3, 'playSound', "three.mp3") g_RaceStartCountdown:addClientHook(2, 'playSound', "two.mp3") g_RaceStartCountdown:addClientHook(1, 'playSound', "one.mp3") g_RaceStartCountdown:addClientHook(0, 'playSound', "go.mp3") Learn Lua - Learn to script - GUI scripting Scripter tools - Find/fix errors yourself(!) Don't pm me for scripting help, keep it for the Scripting subforum!
Krayzee Posted August 16, 2011 Author Posted August 16, 2011 It works great, thanks! Now to find out more stuff
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