Paper Posted February 24, 2012 Posted February 24, 2012 Hey guys, i'm trying to script a gamemode but i found first problem: The map cycling... i explain my problem: I use the function: exports.mapmanager:getMapsCompatibleWithGamemode(getThisResource()) for get all maps compatible whit this gamemode, and it's forlder is called "blabla", now if in the map's meta in the "gamemode" field i put "blabla" as gamemode name this should work right? Instead it wont work... This is the info tag in the gamemode's meta: <info author="Paper" version="0.1" type="gamemode" name="blabla" description="" /> and this is the test map's meta: <info gamemodes="blabla" type="map" name="[bLA]Test Map" author="Paper" version="1.0" description=""></info>
Agon Posted February 24, 2012 Posted February 24, 2012 What's your gamemode resource's name? It must be blabla. Because you get blabla resource in your map file
Paper Posted February 24, 2012 Author Posted February 24, 2012 You mean the folder name? Yes it's "blabla"
Agon Posted February 24, 2012 Posted February 24, 2012 resource="blabla" /> you should add this to the meta.xml wiki.multitheftauto.com/wiki/Meta.xml
Paper Posted February 24, 2012 Author Posted February 24, 2012 I should add this line in the map's meta? In the race maps i don't see any line that includes race resource
Kenix Posted February 24, 2012 Posted February 24, 2012 function getMapsForGm( name ) local running = getResourceFromName( name ) or exports.mapmanager:getRunningGamemode( ) if running then return exports.mapmanager:getMapsCompatibleWithGamemode( running ) end return false end Updated. Maybe you mean it?
Paper Posted February 24, 2012 Author Posted February 24, 2012 I think it's the same thing this: exports.mapmanager:getMapsCompatibleWithGamemode(getThisResource())
Paper Posted February 24, 2012 Author Posted February 24, 2012 Exhaustive anserw... why it's not the same?
Kenix Posted February 24, 2012 Posted February 24, 2012 Can you explain better please , what you want.
Castillo Posted February 24, 2012 Posted February 24, 2012 I think Paper want's you to explain why: exports.mapmanager:getMapsCompatibleWithGamemode(getThisResource()) isn't the same as: function getMapsForGm( name ) local running = getResourceFromName( name ) or exports.mapmanager:getRunningGamemode( ) if running then return exports.mapmanager:getMapsCompatibleWithGamemode( running ) end return false end
Kenix Posted February 24, 2012 Posted February 24, 2012 Because this: function getMapsForGm( name ) local running = getResourceFromName( name ) or exports.mapmanager:getRunningGamemode( ) if running then return exports.mapmanager:getMapsCompatibleWithGamemode( running ) end return false end get maps from name gm or current ( running ) gm.
Paper Posted February 24, 2012 Author Posted February 24, 2012 I don't need this script because i will use this function in the gamemode... Anyway i solved in another way, thanks anyway
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