koragg Posted November 13, 2017 Share Posted November 13, 2017 As the title says - how can I make the time left become 15 seconds (without all players having finished) without actually waiting for it to happen naturally (force it)? I'm talking about the race gamemode btw. I just can't remember/find how this could be done (but I know I've seen it long ago somewhere around the files, just idk what to search for now). Example of normal occurance: All players finish (or the ones that have not finished are in 'Spectating' mode) - timeleft becomes 15 seconds (doesn't matter what it was before that). I need to make this work in my resource but don't know the name of the event that I need to trigger or of the function I have to use. Help, please Link to comment
Moderators IIYAMA Posted November 14, 2017 Moderators Share Posted November 14, 2017 local testEventHandler = function (...) iprint("eventName:", eventName, "has been executed with arguments:", ...) end local addEventHandler_ = addEventHandler function addEventHandler (...) addEventHandler_(...) local arguments = {...} arguments[3] = testEventHandler -- replace the function addEventHandler_(unpack(arguments)) end (untested) For events, you might be able to figure it out with wrappers. 2 Link to comment
koragg Posted November 15, 2017 Author Share Posted November 15, 2017 (edited) Found it In race_server.lua a function called "function raceTimeout()". Thanks to this post. Just had to add an event to it and then trigger it. Edited November 15, 2017 by koragg 1 Link to comment
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