Jump to content

[Help] Disable race_toptimes for a resource


Mossy

Recommended Posts

Long story short, I divided my race resource into DD, DM, etc and I want to disable the top times for DD but I could not find what script stores the function of starting the race_toptimes resource.

Basically, how can I stop the race_toptimes resource from starting when I start DD?

Link to comment

This should go to scripting... anyway, if all your DD maps got DD prefix, you could create resource which checks map name at start and if it has DD, use stopResource to stop toptimes. stopResource needs ACL allowance.

If you can't do it, post in scripting section.

Link to comment

You need to edit the toptimes scripts.

I haven't tested this myself, but you could try this:

Go to the race_toptimes resource and open toptimes_client.lua. Go to line 609:

    if self.startshow then 

Replace it with:

    local ddMap = true 
    if #getElementsByType("checkpoint") > 0 then -- checkpoints = racemap 
        ddMap = false 
    else -- checking if there is a Hunter-pickup 
        for i, pickup in pais ( getElementsByType ( "racepickup" ) ) do 
            local type, vehicle = getElementData(pickup,"type"), getElementData(pickup,"vehicle") 
            if type == "vehiclechange" and vehicle and tonumber(vehicle) == getVehicleModelFromName("Hunter") then 
                ddMap = false 
            end 
        end 
    end      
    if not ddMap then 

Again, I haven't tested this, so no guarantee that it works.

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