Jump to content

Override the meta.xml respawn


Sex*

Recommended Posts

You want to have random cars spawned all over the place? Well the easiest thing is to use a math.random to get the X, Y's. And to place them into the xml first open and unload it;

math.random 
xmlLoadFile 
xmlUnloadFile 
xmlNodeGetAttribute 
xmlNodeGetValue 
xmlNodeSetAttribute 
xmlNodeSetValue 
  

Link to comment

OMFG no, i mean gamemode race, some mapper puts into his map respawn, but i have like alot of race maps that have respawn on them, so i want to make a script that disables the respawn in all of the maps(DM, DD, FUN maps).

Link to comment

you need to edit your race.zip

base.lua

function RaceMode:onPlayerWasted(player) 
    if not self.checkpointBackups[player] then 
        return 
    end 
    TimerManager.destroyTimersFor("checkpointBackup",player) 
    if RaceMode.getMapOption('respawn') == 'timelimit' and not RaceMode.isPlayerFinished(source) then 
        -- See if its worth doing a respawn 
        local respawnTime       = RaceMode.getMapOption('respawntime') 
        if self:getTimeRemaining() - respawnTime > 3000 then 
        --    Countdown.create(respawnTime/1000, restorePlayer, 'You will respawn in:', 255, 255, 255, 0.25, 2.5, true, self.id, player):start(player) 
        end 
        if RaceMode.getMapOption('respawntime') >= 5000 then 
            TimerManager.createTimerFor("map",player):setTimer(clientCall, 2000, 1, player, 'Spectate.start', 'auto') 
        end 
    end 
    if g_MapOptions.respawn == 'none' then 
        removeActivePlayer( player ) 
        TimerManager.createTimerFor("map",player):setTimer(clientCall, 2000, 1, player, 'Spectate.start', 'auto') 
        if getActivePlayerCount() < 1 and g_CurrentRaceMode.running then 
            RaceMode.endMap() 
        end 
    end 
end 

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