Paper Posted February 24, 2012 Share 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> Link to comment
Agon Posted February 24, 2012 Share Posted February 24, 2012 What's your gamemode resource's name? It must be blabla. Because you get blabla resource in your map file Link to comment
Paper Posted February 24, 2012 Author Share Posted February 24, 2012 You mean the folder name? Yes it's "blabla" Link to comment
Agon Posted February 24, 2012 Share Posted February 24, 2012 resource="blabla" /> you should add this to the meta.xml wiki.multitheftauto.com/wiki/Meta.xml Link to comment
Paper Posted February 24, 2012 Author Share 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 Link to comment
Kenix Posted February 24, 2012 Share 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? Link to comment
Paper Posted February 24, 2012 Author Share Posted February 24, 2012 I think it's the same thing this: exports.mapmanager:getMapsCompatibleWithGamemode(getThisResource()) Link to comment
Paper Posted February 24, 2012 Author Share Posted February 24, 2012 Exhaustive anserw... why it's not the same? Link to comment
Kenix Posted February 24, 2012 Share Posted February 24, 2012 Can you explain better please , what you want. Link to comment
Castillo Posted February 24, 2012 Share 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 Link to comment
Kenix Posted February 24, 2012 Share 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. Link to comment
Paper Posted February 24, 2012 Author Share 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 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