Jump to content

Race mod


pocko

Recommended Posts

i search in all lua files and found this in race_server.lua

g_RaceStartCountdown = Countdown.create(6, launchRace) 
g_RaceStartCountdown:useImages('img/countdown_%d.png', 474, 204) 
g_RaceStartCountdown:enableFade(true) 
g_RaceStartCountdown:addClientHook(3, 'playSoundFrontEnd', 44) 
g_RaceStartCountdown:addClientHook(2, 'playSoundFrontEnd', 44) 
g_RaceStartCountdown:addClientHook(1, 'playSoundFrontEnd', 44) 
g_RaceStartCountdown:addClientHook(0, 'playSoundFrontEnd', 45) 
  

here how i made it but not work ;x

g_RaceStartCountdown = Countdown.create(6, launchRace) 
g_RaceStartCountdown:useImages('img/countdown_%d.png', 474, 204) 
g_RaceStartCountdown:enableFade(true) 
g_RaceStartCountdown:addClientHook(3, 'playSoundFrontEnd', 44) 
g_RaceStartCountdown:addClientHook(2, 'playSoundFrontEnd', 44) 
g_RaceStartCountdown:addClientHook(1, 'playSoundFrontEnd', 44) 
playSound("sfx/321.mp3") 
g_RaceStartCountdown:addClientHook(0, 'playSoundFrontEnd', 45) 
playSound("sfx/go.mp3") 

Link to comment

Can you show me how to make it ?I re read it 3 times and not understand :x My new tryed again fail :x

g_RaceStartCountdown = Countdown.create(6, launchRace) 
g_RaceStartCountdown:useImages('img/countdown_%d.png', 474, 204) 
g_RaceStartCountdown:enableFade(true) 
g_RaceStartCountdown:addClientHook(3, 'playSoundFrontEnd', 44) 
g_RaceStartCountdown:addClientHook(2, 'playSoundFrontEnd', 44) 
g_RaceStartCountdown:addClientHook(1, 'playSoundFrontEnd', 44) 
g_RaceStartCountdown:addClientHook(0, 'playSoundFrontEnd', 45)then  playSound("file.wav") 

Link to comment

you dont know what you're doing. you need to have quite good understanding of lua and programming in general to edit race resource.

you can try replacing the function that is called with playSound and sound id argument with your file, but it will probably work only if playSoundFrontEnd is called clientside.

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