[FilterScript] [FS] Simple MTA Map Loader (No more converting!)
#1

This is a very simple MTA map loader I made when I was really bored. All you have to do is download the XML plugin by Zeex, and add maploader to your filterscripts line on server.cfg, log in as RCON admin. Then you move the .map file you want to load in your scriptfiles folder, and do /loadmap [map file name]. Remember to NOT input the extension (.map). I.E, if you wanted to load a map called facility.map, you'd do /loadmap facility.

Remember that you need the XML plugin and you need to be logged in as RCON admin to use it.

Bugs: Only bug I know of, is that you may get 2 warnings of bad object IDs. That's normal and shouldn't affect your map.

Feel free to modify it to your needs, just don't remove my name.

Download (PWN + AMX)

Enjoy
Reply
#2

Quote:
Originally Posted by Seif_
Does this actually work? This is pretty much what it looks like:
pawn Code:
CMD:loadmap(playerid,params[])
{
   
    new mstr[255];
    new fproc[255]
    new coord[100];
    format(mstr,255,"%s.map",params);
    new XML:mfile = xml_open(mstr);
    new File:mfile2 = fopen(mstr);
    if(fexist(mstr))
    {
        new l;
        while(fread(mfile2,fproc))
        {
           
            printf("x = %f",xml_get_float(mfile,"map/object/@posX\n"));
        }
    }
    return 1;
}
How in the world does this load a MTA map?
And Yet he doesn't even include the Inc files. Such A Shame.
Reply
#3

Quote:
Originally Posted by Seif_
Quote:
Originally Posted by Tɧ϶ Tσηί™
Quote:
Originally Posted by Seif_
Does this actually work? This is pretty much what it looks like:
pawn Code:
CMD:loadmap(playerid,params[])
{
   
    new mstr[255];
    new fproc[255]
    new coord[100];
    format(mstr,255,"%s.map",params);
    new XML:mfile = xml_open(mstr);
    new File:mfile2 = fopen(mstr);
    if(fexist(mstr))
    {
        new l;
        while(fread(mfile2,fproc))
        {
           
            printf("x = %f",xml_get_float(mfile,"map/object/@posX\n"));
        }
    }
    return 1;
}
How in the world does this load a MTA map?
And Yet he doesn't even include the Inc files. Such A Shame.
He did, I just showed what the filterscript is doing, I didn't show the whole source. The rest is pretty much including the includes.
I just tested it, Didn't Work. Tried to log into rcon and do it, didn't work, put the .map file in teh scriptfiles, main server file, all I get is SERVER: Unknown Command.
Reply
#4

Shit I uploaded the wrong PWN file. Sorry guys, I'll upload the correct one.
Reply
#5

Unknown command usually means you didn't run the XML plugin. The XML plugin + include, you will be able to find it here. And don't tell me you can't find the ZCMD include.
Reply
#6

well that cmd worked, just that we had the wrong Pwn. 2nd - Maps are not loading, due to some sort of bug..?
Reply
#7

where to get xml plugin?
Reply
#8

https://sampforum.blast.hk/showthread.php?tid=150755 should work.

I'm not sure if this even works anymore...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)