Jump to content

[HELP]Race Problem


MrXz

Recommended Posts

Hi all ...

Well, the problem is when I put a map in setmap, and then I redo this map in set, it disappears

I've seen in some servers nextmap appears in the map below

Help ..

mta-screen_2012-02-03_19-36-08.png

mta-screen_2012-02-03_19-36-49.png

Scripts:

racevoting_server.lua - Seach 'nextmap'

  
addCommandHandler('nextmap', 
    function( player, command, ... ) 
        local query = #{...}>0 and table.concat({...},' ') or nil 
        if not query then 
            if g_ForcedNextMap then 
                outputRace( 'Next map is ' .. getMapName( g_ForcedNextMap ), player ) 
            else 
                outputRace('Next map is not set', player, 1, 139, 245, true) 
            end 
            return 
        end 
        if not _TESTING and not isPlayerInACLGroup(player, g_GameOptions.admingroup) then 
            return 
        end 
        local map, errormsg = findMap( query ) 
        if not map then 
            outputRace( errormsg, player ) 
            return 
        end 
        if g_ForcedNextMap == map then 
            outputRace( 'Next map is already set to ' .. getMapName( g_ForcedNextMap ), player ) 
            return 
        end 
        g_ForcedNextMap = map 
        outputChatBox('*Nextmap: #00B7FF' .. getMapName( g_ForcedNextMap ) .. ' #FFFFFFby ' .. getPlayerName( player ), g_Root, 255, 255, 255, true) 
        triggerClientEvent("setNextMap", getRootElement(), getMapName(g_ForcedNextMap)) 
    end 
) 
  

racevoting_server.lua - end of the file.

  
addEvent("onMapStarting",true) 
addEventHandler("onMapStarting",getRootElement(), 
function() 
triggerClientEvent("setNextNil", getRootElement()) 
end) 
  

Edited by Guest
Link to comment

I'm saying is that when I put a map in nextmap, and I redo the map is at stake, nextmap appears in "Random" and not the map that was in nextmap, check images

  
function hudSet () 
local screenWidth, screenHeight = guiGetScreenSize() 
dxDrawColorText ('#9900FFNext: #FFFFFF' .. g_NextMap, 2, screenHeight - dxGetFontHeight(0.7, 'bankgothic')/2, 100, 100, tocolor ( 255, 255, 255, 255 ), 0.3, 'bankgothic', 0.6, 'left') 
  
  

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