Jump to content

Countdown audio


Krayzee

Recommended Posts

Posted

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.

15s4o4n.png
Posted

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.

15s4o4n.png
Posted

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!

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