Jump to content

Map Shop - Race


'LinKin

Recommended Posts

Posted

Hello,

I want to make a GUI so that it displays a list of all maps compatible with Race gamemode. (Only Race).

Which stuff should I use to get those maps?

Also, to order them alphabetically in the GUI.

Thanks.

Need a clanwar script? Click here!

Do you want some free scripts for your DD server? Visit my website.

Posted

Try this:

  
local raceMaps = {} 
  
addEventHandler('onResourceStart', resourceRoot, function() 
 for index, resource in pairs(getResources()) do 
  if (getResourceInfo(resource, "type") == "map" and string.find(getResourceInfo(resource, "gamemodes") or "", "race") then 
   table.insert(raceMaps, resource) 
  end 
 end 
end) 
  

Business System viewtopic.php?f=108&t=35797

Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726

SQLite Tutorial viewtopic.php?f=148&t=38203

Posted

Hmm,

I remember some function that was smth like this: getMapsCompatibleWithGamemode(getRunningGamemode()).

Also, how to sort them alphabetically?

Need a clanwar script? Click here!

Do you want some free scripts for your DD server? Visit my website.

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