How to load maps from website -
akib - 14.11.2018
Is this possible to load maps from a specified website like pastebin or website.com/maps.txt
I tried with HTTP function but i can't load the maps...
Please help me on this
Re: How to load maps from website -
khRamin78 - 14.11.2018
first the texts should be totally defined as pawn normal filterscript methods
then you need to compile the filterscript [selfmade c++ script would be needed to auto compile the script loaded]
and then you can read that filterscript from server
so it has long way if you realy need that happen you can do this way only
but i think just copy/pasting the codes in a .pwn file and then making it a filterscript would be much esaier
all thing you have to do is just do /rcon loadfs <fs name>
Re: How to load maps from website -
dotSILENT - 14.11.2018
You can write your own file parsing code to load objects from files. I use sscanf for parsing the lines, like that:
PHP код:
if(!strcmp(funcName, "CreateDynamicObject") && paramLen)
{
if(sscanf(funcParams, "p<,>dffffffD(-1)D(-1){D(-1)}F(-1.0)F(-1.0)D(-1)D(0)", modelid, posX, posY, posZ, rotX, rotY, rotZ, worldid, interiorid, streamDist, drawDist, areaid, priority))
continue;
if(drawDist == -1.0)
drawDist = gDrawDist;
if(streamDist == -1.0)
streamDist = gStreamDist;
if(worldid == -1)
worldid = gVW;
if(interiorid == -1)
interiorid = gInterior;
if(priority == 0)
priority = gPriority;
tempObjID = CreateDynamicObject(modelid, posX+gOffset[0], posY+gOffset[1], posZ+gOffset[2], rotX, rotY, rotZ, worldid, interiorid, -1, streamDist, drawDist, areaid, priority);
Creating your own parser is very useful in some cases, as you can create your own 'functions', I have a few of them. For example setting the VW for all objects is as simple as writing
same goes for setting streaming/draw distances, priorities etc. I also have a setOffset(x,y,z) func which allows me to move entire maps by an offset I choose.