Jump to content

[HELP] Force the 'Time's up, pal' to come on demand.


koragg

Recommended Posts

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 xD

Link to comment
  • Moderators
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.

  • Like 2
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...