MrXz Posted February 4, 2012 Share Posted February 4, 2012 (edited) 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 .. 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 February 4, 2012 by Guest Link to comment
Castillo Posted February 4, 2012 Share Posted February 4, 2012 You're setting the text to "Random" when a map start's, you're setting a next map AFTER it started? Link to comment
MrXz Posted February 4, 2012 Author Share Posted February 4, 2012 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now