Jump to content

disable vote system


Recommended Posts

admin>resources>(select)race>settings>random map something like that set that to "true"

Thanks but how i can get the next map's name??

because i want to make a dxText that tells you what's the next map is.

function getNextMap() 
 if (g_ForcedNextMap) then 
  return getMapName( g_ForcedNextMap ) 
 else 
  return "Random" 
 end 
end 

Link to comment
admin>resources>(select)race>settings>random map something like that set that to "true"

Thanks but how i can get the next map's name??

because i want to make a dxText that tells you what's the next map is.

function getNextMap() 
 if (g_ForcedNextMap) then 
  return getMapName( g_ForcedNextMap ) 
 else 
  return "Random" 
 end 
end 

g_ForcedNextMap is Undefined Before!

Link to comment

You can make your own random map system, like:

Looping trough 9 maps or something at the beginning from the match then pick a random one, if the random one matched with the previous then return a another map. And then you can get the next map's random one's name.

Link to comment
You can make your own random map system, like:

Looping trough 9 maps or something at the beginning from the match then pick a random one, if the random one matched with the previous then return a another map. And then you can get the next map's random one's name.

ok but how can i loop the maps? should i use getElementsByType("MAPS") or what?

Link to comment
You can make your own random map system, like:

Looping trough 9 maps or something at the beginning from the match then pick a random one, if the random one matched with the previous then return a another map. And then you can get the next map's random one's name.

ok but how can i loop the maps? should i use getElementsByType("MAPS") or what?

example, than you can use

clientside

  
g_NextMap = "unknown" 
  
function update_client_infos(Nextmap) 
    g_NextMap = Nextmap 
end 
addEvent("update_client_infos", true) 
addEventHandler("update_client_infos", getRootElement(), update_client_infos) 

serverside

  
function getNextMap() 
 if (g_ForcedNextMap) then 
  return getMapName( g_ForcedNextMap ) 
 else 
  return "Random" 
 end 
end 
  
function sendInfoToClient() 
    local Nextmap =  getNextMap() 
    players = getElementsByType("player") 
    for index,value in ipairs(players) do 
        triggerClientEvent(value, "update_client_infos", value, nextmap) 
    end 
end 
setTimer(sendInfoToClient, 3000, 0) 

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