Jump to content

Small help


Recommended Posts

function getResourceMaps(resource) 
    local scripts = {} 
    local resourceName = tostring(resource) 
    local theMeta = xmlLoadFile(":"..resourceName.."/meta.xml") 
    for i, node in ipairs (xmlNodeGetChildren(theMeta)) do 
        if (xmlNodeGetName(node) == "map") then 
            local script = xmlNodeGetAttribute(node, "src") 
            if (script) then 
                table.insert(scripts, script) 
    return scripts 

xmlNodeGetChildren and ipairs got boolean all time. The resourceName is "play".

Link to comment

Greetings Anubhav,

I don't understand exactly what you mean, but I'll give it a try.

If you don't want the ''play'' gamemode, just delete the resource ''play'', the only thing it does is spawn randomly cars everywhere on the map. (When you delete it the gamemode will turn into ''MTA:SA'')

To get another gamemode name? You need to do that with a meta.xml file.


    "Marty" type="gamemode" name="" /> 

In case you know this already, I'm sorry I didn't understand your question.

In that case, please re-phrase your question and I will try to help you.


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