Jump to content

Looking for a nextmap vote script


Klaudis

Recommended Posts

Hello Everyone. I'm looking for a script that starts nextmap vote after all of the players are dead. I need it for a race DM server. You know when only one person is left alive (playing with no respawns), the voting for nextmap starts. So I would like a script for that vote to start after all of the players are dead, not after only one player is left, so that the last person could get to the hunter.

So is there a script that makes this possible, or do I need to edit something in the nextmap vote setting?

Thx for your answers. :)

Link to comment

race_client.lua

Here:

addEventHandler('onClientPlayerWasted', g_Root, 
    function() 
        if not g_StartTick then 
            return 
        end 
        local player = source 
        local vehicle = getPedOccupiedVehicle(player) 
        if player == g_Me then 
            if #g_Players > 1 and (g_MapOptions.respawn == 'none' or g_MapOptions.respawntime >= 10000) then 
                if Spectate.blockManualTimer and isTimer(Spectate.blockManualTimer) then 
                    killTimer(Spectate.blockManualTimer) 
                end 
                TimerManager.createTimerFor("map"):setTimer(Spectate.start, 2000, 1, 'auto') 
            end 
        else 
            Spectate.dropCamera( player, 1000 ) 
        end 
    end 
) 

Search for 'onClientPlayerWasted'.

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