1
0
mirror of https://github.com/citizenfx/cfx-server-data.git synced 2025-02-14 10:22:55 +08:00

ADD: mapmanager - getMaps function and export

This commit is contained in:
Ryan Bucshon 2017-06-08 19:59:50 -05:00
parent 051a33a116
commit 419782644a
2 changed files with 6 additions and 1 deletions

View File

@ -15,3 +15,4 @@ server_export "getCurrentMap"
server_export "changeGameType" server_export "changeGameType"
server_export "changeMap" server_export "changeMap"
server_export "doesMapSupportGameType" server_export "doesMapSupportGameType"
server_export "getMaps"

View File

@ -267,6 +267,10 @@ function getCurrentMap()
return currentMap return currentMap
end end
function getMaps()
return maps
end
function changeGameType(gameType) function changeGameType(gameType)
if currentMap and not doesMapSupportGameType(gameType, currentMap) then if currentMap and not doesMapSupportGameType(gameType, currentMap) then
StopResource(currentMap) StopResource(currentMap)
@ -301,4 +305,4 @@ function doesMapSupportGameType(gameType, map)
end end
return maps[map].gameTypes[gameType] return maps[map].gameTypes[gameType]
end end