Vice City: Multiplayer

Server Development => Scripting and Server Management => Script Showroom => Topic started by: Doom_Kill3R on August 16th, 2015, 12:24 PM

Title: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on August 16th, 2015, 12:24 PM
Map Editor - Vice City Multiplayer

Hello gentlemen ( or ladies if any ), its finally done! What you have been waiting for is finally to be experienced by you, I present you my map editor. Since @DeViL_JiN started mapping for Empire Gaming, it was really hard as the software introduced to map for Vice City were kinda not compatible with VCMP as they would throw wrong rotation values. So I started my work to built an ingame map editor so its easier to map and test at the same time! Mapping together and backup your maps and edit them later whenever you want!

This map editor will also print a complete fine CreateObject statement with rotation in vector as well as a complete XML & .nut file with all the code written in them so you can easily copy and paste them into your script!

Interaction with Editor

Its easy make sure you read this carefully, the editor is really user-friendly and takes you no time to learn.

If you keep holding an arrow key the object will be continuously in motion, you don't need to tap keys to rotate or move them, just hold the key ;)

Maps Management:-

Objects Management:-

Player Management:-

Player Keys:-

Objects Menu:-

Outputs:-
Once finished creating a map and its time for you to use it. You can use the export command as mentioned above. After you see the message that the map has been outputted successfully, you can go into /scripts/Maps/ and here you will find a .nut and .xml file with the same name as your map with all the codes inside.

Credits:-

(http://i.imgur.com/4bxgeVr.png)

(http://i.imgur.com/m7hTYgE.png)

(http://i.imgur.com/niVxBX6.png)

- Video by @KAKAN
https://www.youtube.com/watch?v=e2UdmTlEYM8&feature=youtu.be#

(http://files.thijn.ovh/img/3b7e33f82d08c785280003e001444629/Map_Editor_v1.3.2.zip)(http://files.thijn.ovh/download/3b7e33f82d08c785280003e001444629/Map_Editor_v1.3.2.zip)

(click to show/hide)
(http://files.thijn.ovh/img/1af590e2bdde733bb63a1f35bae69d6e/Map-Editor-1.3.7z)(http://files.thijn.ovh/download/1af590e2bdde733bb63a1f35bae69d6e/Map-Editor-1.3.7z)

Download: Editor v1.2.9(http://files.thijn.ovh/download/d31c9a1e5c068f5293116bb0ee7398d3/Editor v1.2.9.zip)
(http://files.thijn.ovh/img/d31c9a1e5c068f5293116bb0ee7398d3/Editor v1.2.9.zip)

Download: Editor v1.2.8(http://files.thijn.ovh/download/e0fb38c137eef4f195f29ccaee823e1f/Editor-v1.2.8.zip)
(http://files.thijn.ovh/img/e0fb38c137eef4f195f29ccaee823e1f/Editor-v1.2.8.zip)

Download: Editor v1.2.7(http://files.thijn.ovh/download/e0fb38c137eef4f195f29ccaee823e1f/Editor-v1.2.7.zip)
(http://files.thijn.ovh/img/d3e56847ca9c27a72072a70b04648cda/Editor-v1.2.7.zip)

Download: Map_Editor_v1.2.6.zip(http://files.thijn.ovh/download/e55636574f343ba08910237d7a257d3a/[VCMP)
(http://files.thijn.ovh/img/e55636574f343ba08910237d7a257d3a/[VCMP]Map_Editor_v1.2.6.zip)

Download: (http://files.thijn.ovh/img/cd432ccfba76b5955537338364141480/Map-Editor-v1.2.5.zip)(http://files.thijn.ovh/download/cd432ccfba76b5955537338364141480/Map-Editor-v1.2.5.zip)

Download: Map Editor v1.2.4.rar(http://files.thijn.ovh/download/27d8805c8e59c1e2456edcb10638ed83/[VCMP)

(http://files.thijn.ovh/img/27d8805c8e59c1e2456edcb10638ed83/[VCMP] Map Editor v1.2.4.rar)

Changelog:-

Code: [Select]
-    Changelog - v1.1
-    ► Changed datatype for rotations x, y, z to FLOAT.

-    Changelog - v1.2
-    ► Improved queries to reduce memory leakage.
-    ► Added Page UP | DOWN key in keys list.

-    Changelog - v1.2.3
-    ► Fixed errors.
-    ► Fixed crash on loading map.
-    ► Fixed some other things regarding errors and crashes.

-    Changelog - v1.2.4
-    ► Now with free camera view! /cam to toggle!

-    Changelog - v1.2.5
-    ► Added text for Currently Holding Object Name and Model.
-    ► Added Auto Saving for maps, default auto save every minute.
-    ► Added autosave command! /autosave to toggle.

-    Changelog - v1.2.6
-    ► Map menu is now available! use /addobject without any id to enter map menu and select map while previewing!
-    ► Press CTRL to select & create the object.

-    Changelog - v1.2.7
-    ► Exports are now exported in a text file without any [SCRIPT] Tags, easy to add objects in script now!

-    Changelog - v1.2.8
-    ► Fixed locations as the database was bugged
-    ► Added /settime [hour] [minute] and /setweather [id] to set weather & time.
-    ► Added object control in object selection menu, use page up/down to move object higher/lower and arrow up/down to bring it near or far.
-    ► Added commands to get a list of all maps & locations. /getmaps & /getlocs
-    ► Changed the location of object selection menu
-    ► Added /view command to switch immediately to any object ID supplied when in object selection menu
-    ► Added commands /deletemap [name] and /deleteloc [name] to delete any map or location from database

-    Changelog - v1.2.9
-    ► Now supports XML outputs!
-    ► Fixed /desall, not removing all objects.
-
-   Changelog - v1.2.9
-   ► Now supports XML outputs!
-   ► Fixed /desall, not removing all objects.
-   
-   Changelog - v1.3
-   ► Updated to latest server version
-   ► Fixed a few very minor bugs
-   ► Added client-sided gui labels
-   
-   Changelog - v1.3.2
-   ► Fixed /desall @ Thanks to Omar for pointint it out!
-   ► Fixed /closemap working as savemap; Note that if you map but didn't save and did closemap, changes will be lost!
-   ► Added /selectobject || /editobject to edito the object ID specified; Useful for objects which can't be shot/collided @ Idea by [Serious]Sam.
-   ► Added /objects || /allobjects to get a list of every object created with its ID and model @ Idea by [Serious]Sam.

~ Happy mapping!
~ 300th post!
~ Regards, Doom_Killer!
Title: Re: [ #D~ Tools ] Map Editor
Post by: Thijn on August 16th, 2015, 12:37 PM
First of all, nice work :)

Like pretty much every release here, I always have some things to point out :P

I'm not sure if I like your map saving system. Why not create 2 tables: maps and objects.
Quote
- Maps
ID
Name

- Objects
ID
MapId
Model
x
y
z
rotx
roty
rotz
Another thing I like to point out, why save rotations as VARCHAR when you have the FLOAT datatype?
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on August 16th, 2015, 12:41 PM
Quote from Thijn on August 16th, 2015, 12:37 PM
First of all, nice work :)
Thanks :)
Quote from Thijn on August 16th, 2015, 12:37 PM
Like pretty much every release here, I always have some things to point out :P
You are definitely welcomed to point out things which can be improved.
Quote from Thijn on August 16th, 2015, 12:37 PM
I'm not sure if I like your map saving system. Why not create 2 tables: maps and objects.
Quote
- Maps
ID
Name

- Objects
ID
MapId
Model
x
y
z
rotx
roty
rotz
Uh, I don't like it that way, I preferred this way because all I have to deal with is to be able to save and load maps for later editings and other stuff.
Quote from Thijn on August 16th, 2015, 12:37 PM
Another thing I like to point out, why save rotations as VARCHAR when you have the FLOAT datatype?
Woops, my bad, I'll change them and update it ;)

Edit: @Thijn, done.
Title: Re: [ #D~ Tools ] Map Editor
Post by: FinchDon on August 16th, 2015, 01:09 PM
Nice Work Bhai ( Brother ) But Can You give link of SLC Sqlite Plugin?
Title: Re: [ #D~ Tools ] Map Editor
Post by: . on August 16th, 2015, 03:20 PM
Quote from FinchDon on August 16th, 2015, 01:09 PM
Can You give link of SLC Sqlite Plugin?
===>>>(http://forum.vc-mp.org/?topic=420.0)



Quick suggestions.


One more very important suggestion is to use SQLite_Release(...) on the values returned by SQLite_Query(...). Otherwise you introduce a memory leak.
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on August 16th, 2015, 03:38 PM
Since its v1.0, I'll keep updating it to make it better and better, thanks for suggesting those, i'll get into it as soon as possible.
Title: Re: [ #D~ Tools ] Map Editor
Post by: FinchDon on August 16th, 2015, 03:46 PM
bro i checkout it its quit good but how i set it z coords up and down
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on August 16th, 2015, 04:18 PM
Quote from FinchDon on August 16th, 2015, 03:46 PM
bro i checkout it its quit good but how i set it z coords up and down
Page up and Page down, forgot to mention that.
Title: Re: [ #D~ Tools ] Map Editor
Post by: FinchDon on August 16th, 2015, 06:05 PM
Thanks
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on August 17th, 2015, 11:19 AM
Update - v1.2
Code: [Select]
-        Changelog - v1.1
-        ► Changed datatype for rotations x, y, z to FLOAT.
-
-        Changelog - v1.2
-        ► Improved queries to reduce memory leakage.
-        ► Added Page UP | DOWN key in keys list.

First post links updated.
Title: Re: [ #D~ Tools ] Map Editor
Post by: MacTavish on August 18th, 2015, 06:31 AM
Nice job man :)
Title: Re: [ #D~ Tools ] Map Editor
Post by: KAKAN on August 18th, 2015, 09:41 AM
Nice JOB!
Title: Re: [ #D~ Tools ] Map Editor
Post by: kokia on August 22nd, 2015, 08:17 AM
not working error is excepted "=" line 391, line 391 =
Code: [Select]
        if( Location ) return { SQLite_Release( Location ); return true }
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on August 22nd, 2015, 08:49 AM
Quote from kokia on August 22nd, 2015, 08:17 AM
not working error is excepted "=" line 391, line 391 =
Code: [Select]
        if( Location ) return { SQLite_Release( Location ); return true }
Yes ofcourse, I've mistakenly repeated return, I've pushed an update, should be fixed now, first post link updated to v1.2.1. Thanks for reporting.
Title: Re: [ #D~ Tools ] Map Editor
Post by: Xmair on August 22nd, 2015, 10:23 AM
Just a small suggestion, here it is :-
Whenever the map editor is closed or a command is written, the objects are saved into a .ini with CreateObject and XML statements, this might help people who don't have much time.
Anyway, Good job, It's better than using KEd for me :)
Title: Re: [ #D~ Tools ] Map Editor
Post by: kokia on August 22nd, 2015, 12:04 PM
/loadmap crashes server without any error message
some more errors
Code: [Select]
AN ERROR HAS OCCURED [the index 'check_map' does not exist]

CALLSTACK
*FUNCTION [onPlayerCommand()] scripts/Editor.nut line [139]

LOCALS
[text] "lmao2"
[cmd] "newmap"
[player] INSTANCE
[this] TABLE

AN ERROR HAS OCCURED [parameter 1 has an invalid type 'null' ; expected: 'string']

CALLSTACK
*FUNCTION [onPlayerCommand()] scripts/Editor.nut line [150]

LOCALS
[text] NULL
[cmd] "addobject"
[player] INSTANCE
[this] TABLE
line 150 =
Code: [Select]
else if( text != "" && IsNum( text ) )
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on August 22nd, 2015, 12:40 PM
Just tested, no errors, nothing wrong, I have never came across those errors and I bet you have done something wrong.
Title: Re: [ #D~ Tools ] Map Editor
Post by: kokia on August 22nd, 2015, 12:51 PM
i didnt even edited a single alphabet
Title: Re: [ #D~ Tools ] Map Editor
Post by: Thijn on August 22nd, 2015, 02:27 PM
Quote from kokia on August 22nd, 2015, 12:51 PM
i didnt even edited a single alphabet
Change that line to
Code: [Select]
  else if( text && text != "" && IsNum( text ) )
Title: Re: [ #D~ Tools ] Map Editor
Post by: FinchDon on August 22nd, 2015, 03:04 PM
lmao i test my senior system no doubt there is error nothing work Perfect
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on August 23rd, 2015, 04:44 AM
Update - v1.2.3
Code: [Select]
- Changelog - v1.2.3
- ► Fixed errors.
- ► Fixed crash on loading map.
- ► Fixed some other things regarding errors and crashes.

Since I updated to v 1.2.2 I accidentally did a minor mistake leading the whole editor to not work and end up giving errors and crashes, these are all fixed now and fully working. @kokia.
Title: Re: [ #D~ Tools ] Map Editor
Post by: kokia on August 23rd, 2015, 05:05 AM
@Doom_Killer thanks if any error comes again, i will tell you :)
and how to edit "Z" courd.
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on August 23rd, 2015, 06:20 AM
Quote from kokia on August 23rd, 2015, 05:05 AM
@Doom_Killer thanks if any error comes again, i will tell you :)
and how to edit "Z" courd.
As mention in the first post, with page up and down ;)
Title: Re: [ #D~ Tools ] Map Editor
Post by: NC on August 23rd, 2015, 08:29 PM
I recently uploaded a video about an object placer which was supposed to be included in VCMP 0.2. Maybe it can somehow help you as a reference or something else
https://www.youtube.com/watch?v=RzSV80Ip1FU
Title: Re: [ #D~ Tools ] Map Editor
Post by: FinchDon on August 24th, 2015, 02:51 AM
Kokia for z Coords You need to first press 1 to turn rotation off then page up and page down ;)
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on September 19th, 2015, 11:04 AM
Update - v1.2.4
Code: [Select]
- Changelog - v1.2.4
- ► Now with free camera view! /cam to toggle!

I think this is going to be a great advantage for things like this, and I also believe this will push the level of Editor to a better standard, Since thanks to @Juppi for his freeview script, I took some time to adjust it and make it compatible with the Editor itself, You can now easily view your maps from different angles, as well as use it as a teleporting tool as well.

Since @Thijn came out with that pretty clean mirror and download image facility, I also used it for purpose to download the next update.

Cheers!
Regards,
Doom_Kill3R!
Title: Re: [ #D~ Tools ] Map Editor
Post by: KAKAN on September 19th, 2015, 12:48 PM
Nice work you did! This is gonna help us!
Thanks to @Juppi, and @Thijn too
Title: Re: [ #D~ Tools ] Map Editor
Post by: Wolf on September 20th, 2015, 06:56 AM
here a bug i loaded this and open i try to create a object but it can't
Title: Re: [ #D~ Tools ] Map Editor
Post by: FinchDon on September 20th, 2015, 07:45 AM
/addobject <id>
Title: Re: [ #D~ Tools ] Map Editor
Post by: Wolf on September 21st, 2015, 02:22 PM
What a script.
Title: Re: [ #D~ Tools ] Map Editor
Post by: Wolf on September 29th, 2015, 04:08 PM
Can you give me that plugins @Doom_Killer
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on September 29th, 2015, 04:20 PM
I have no words and neither do I have more strength to handle people like wolf now. I'm warning you @Wolf, don't post on any of my topics again.

@Thijn, please remove the useless posts I request you.
Title: Re: [ #D~ Tools ] Map Editor
Post by: Wolf on September 29th, 2015, 04:42 PM
Why i post what you do i ask you for help in scripting and you ask me this


@Stormeus please ban @Doom_Killer i ask him for help me in scripting and he ask me that i warn you @Wolf
Title: Re: [ #D~ Tools ] Map Editor
Post by: Xmair on September 29th, 2015, 04:59 PM
Quote from Wolf on September 29th, 2015, 04:42 PM
Why i post what you do i ask you for help in scripting and you ask me this


@Stormeus please ban @Doom_Killer i ask him for help me in scripting and he ask me that i warn you @Wolf
What the ...fuck?
Title: Re: [ #D~ Tools ] Map Editor
Post by: Stormeus on September 29th, 2015, 05:55 PM
@Wolf No.
Title: Re: [ #D~ Tools ] Map Editor
Post by: KAKAN on September 29th, 2015, 06:38 PM
Quote from Wolf on September 29th, 2015, 04:08 PM
Can you give me that plugins @Doom_Killer
Can't you download Squirrel Plugin?
And if you have eyes, then read the 1st page of this topic, you'll surely find the sqlite plugin, @Wolf
Title: Re: [ #D~ Tools ] Map Editor
Post by: Wolf on September 30th, 2015, 10:58 AM
As you wish @Stormeus
Title: Re: [ #D~ Tools ] Map Editor
Post by: Wolf on September 30th, 2015, 11:09 AM
Quote from KAKAN on September 29th, 2015, 06:38 PM
Quote from Wolf on September 29th, 2015, 04:08 PM
Can you give me that plugins @Doom_Killer
Can't you download Squirrel Plugin?
And if you have eyes, then read the 1st page of this topic, you'll surely find the sqlite plugin, @Wolf
I see I have eyes @KAKAN I dwonload that plugins but they can't work.
Title: Re: [ #D~ Tools ] Map Editor
Post by: KAKAN on September 30th, 2015, 11:24 AM
@Wolf, are you on Linux? Have you downloaded the wrong version?
For your info:-
x64 for 64-bit computers
x86 for 32-bit computers
Title: Re: [ #D~ Tools ] Map Editor
Post by: EK.IceFlake on September 30th, 2015, 01:47 PM
However on x64 systems running x32 server, you need x32 plugin
(click to show/hide)
Don't annoy me that it's x86, I like x32 better.
Title: Re: [ #D~ Tools ] Map Editor
Post by: Wolf on September 30th, 2015, 02:26 PM
I have bit 32 linxer server @NE.CrystalBlue or @KAKAN
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on October 4th, 2015, 03:07 PM
I'm done, I requested the forum moderator to wipe out these useless posts but no actions were taken yet and this guy keeps taking his bulls*t higher and higher, I don't want to but I have to lock this topic myself in order to keep it safe from further being rubbed with people like @Wolf.

If anyone has any problem regarding Editor, you can consult me on my IRC channel when I'm available and I will assist you or send me a PM at forums. I will post further updates but the topic is mainly going to be closed as long as there is no way for me to stop such people from entering the topics.


Topic unlocked, thanks to Thijn for banning that annoying guy.
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on October 24th, 2015, 08:57 AM
Update - v1.2.5
Code: [Select]
- Changelog - v1.2.5
- ► Added text for Currently Holding Object Name and Model.
- ► Added Auto Saving for maps, default auto save every minute.
- ► Added autosave command! /autosave to toggle.

50+ Downloads, that's incredible! Nice to see that this tool is being helpful to people and now VC:MP servers will have more unique maps rather than downloading ready-made ones from websites which are being used in most servers.

- First post links updated!
- Suggestions & Bugs are welcomed!

~ Regards,
~ Doom_Kill3R!
Title: Re: [ #D~ Tools ] Map Editor
Post by: KAKAN on October 24th, 2015, 11:14 AM
Nice.
I'll too use it once I get at home.
For sure, I'll try to make a my very unique map
Title: Re: [ #D~ Tools ] Map Editor
Post by: HaCkeR0o1 on December 8th, 2015, 01:56 PM
i having this problem please tell how i solve this........................................................

Code: [Select]
Vice City Multiplayer Server
 -------------------------------
 v0.4, (c) 2007-2014 VC:MP Team

Loaded plugin: squirrel04rel32

Loaded plugin: xmlconf04rel32

Loaded plugin: announce04rel32

[WEAPONS] No custom weapons to load.
[VEHICLEMODELS] No custom vehicle models to load.
announcer: master.vc-mp.org timed out while trying to reach your server; are your ports forwarded?
[MODULE]  Loaded SqVCMP 0.4 frontend by Stormeus. (v1.0)

AN ERROR HAS OCCURED [the index 'SQLite_Open' does not exist]

CALLSTACK
*FUNCTION [onScriptLoad()] scripts/main.nut line [89]

LOCALS
[txdCurrentMap] NULL
[txdTotalObjects] NULL
[this] TABLE
[WARNING] onScriptLoad failed to execute -- check the console for more details.
Title: Re: [ #D~ Tools ] Map Editor
Post by: MacTavish on December 8th, 2015, 02:15 PM
Quote from Doom_Kill3R on August 16th, 2015, 12:24 PM
Needed stuff:-
  • SLC's SQLite plugin(http://forum.vc-mp.org/?topic=420.0).< Click to go there
* Kusanagi Slaped @Doom_Kill3R For Not Mentioning SLC SQLite plugin thread
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on December 8th, 2015, 03:49 PM
@HaCkeR0o1, download SLC's sqLite plugin, you can go to the topic by clicking the link in above post or in the first post under the 'Needed Stuff' section.

@Kusanagi, I didn't expect someone to even fail to read those important informations on the first post.
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on December 17th, 2015, 01:13 PM
Update - v1.2.6
Code: [Select]
-    Changelog - v1.2.6
-    ► Map menu is now available! use /addobject without any id to enter map menu and select map while previewing!
-    ► Press CTRL to select & create the object.
I guess this is going to help you guys alot because, just by holding an arrow key, you can simultaneously go through all the objects! This can also be helpful if anyone wants to create a list of objects, all in all I guess this can be pretty useful. Just use the addobject command without any text/parameters and you will enter the map preview menu.

- Arrow Right : Get the next object for preview.
- Arrow Right : Get the previous object for preview.
- Enter : Create the previewing object.

Sorry no screenies, my game is a little messed up and its stuck at 640x480 resolution which looks kinda ugly, so I thought its better to not post any screenshot at all instead of that rip off quality one. Why don't you try it yourself by downloading the editor ;)

~ Regards,
~ Doom_Kill3R!
Title: Re: [ #D~ Tools ] Map Editor
Post by: KAKAN on December 17th, 2015, 01:27 PM
WOw! Great work mate!!
Will try it out soon!
Title: Re: [ #D~ Tools ] Map Editor
Post by: KAKAN on December 17th, 2015, 03:30 PM
So, here's a video of how it is looking:-
https://www.youtube.com/watch?v=e2UdmTlEYM8&feature=youtu.be
I couldn't record more since I didn't had any space left :D
Title: Re: [ #D~ Tools ] Map Editor
Post by: Xmair on December 17th, 2015, 04:15 PM
Nice work dude.
Title: Re: [ #D~ Tools ] Map Editor
Post by: Beary on December 21st, 2015, 03:16 AM
Hello, this is a nice work, but I have some questions.
My server is all right, but he can't save Object correctly, he shows the 301\302\369 in the database, and so on.
Title: Re: [ #D~ Tools ] Map Editor
Post by: Beary on December 21st, 2015, 03:17 AM
Quote from Beary on December 21st, 2015, 03:16 AM
Hello, this is a nice work, but I have some questions.
My server is all right, but he can't save Object correctly, he shows the 301\302\369 in the database, and so on.
When I read it again, he will not be able to display
Title: Re: [ #D~ Tools ] Map Editor
Post by: Xmair on December 21st, 2015, 04:16 AM
Same as @Beary . Dunno what causes the problem.
Title: Re: [ #D~ Tools ] Map Editor
Post by: KAKAN on December 21st, 2015, 08:48 AM
Quote from Xmair on December 21st, 2015, 04:16 AM
Same as @Beary . Dunno what causes the problem.
Can you explain it? I can't get to what he said.
I tried it, and it works all right.
Title: Re: [ #D~ Tools ] Map Editor
Post by: Xmair on December 21st, 2015, 09:37 AM
Sometimes the objects ids in the db changes to 301,302 or 303.
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on December 21st, 2015, 10:37 AM
Quote from Xmair on December 21st, 2015, 09:37 AM
Sometimes the objects ids in the db changes to 301,302 or 303.
Since I haven't came across any of this, I'll spend a few time with the editor and see if I can reproduce it, although if you are somehow getting it produced too much then you can always download an older version from the archives in the first post.
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on December 22nd, 2015, 04:42 PM
Major Update - v1.2.7
Code: [Select]
- Changelog - v1.2.7
- ► Exports are now exported in a text file without any [SCRIPT] Tags, easy to add objects in script now!
-
So guys this is going to make you extremely happy to know that now when you export any map, it gets exported to the /scripts/Maps/ folder. A new .nut with the mapname will be created containing all the CreateObject statements in a neat way!

Important Note: If you are going to replace the files except for Maps.sqlite database for keeping your maps make sure to you create a folder inside 'scripts/' called 'Maps'.

The whole directory should look as follow:-
Code: [Select]
- Editor
        - scripts
                - Maps
        Maps.sqlite
        locations.sqlite
        FileHandler.addon
        Freeview.addon

@KAKAN, @Castiel :)

~ Regards,
~ Doom_Kill3R!
Title: Re: [ #D~ Tools ] Map Editor
Post by: KAKAN on December 23rd, 2015, 08:07 AM
Hello Doom, I was trying to use the saveloc/gotoloc thing.
THe 'saveloc' thing doesn't work for me in this new and teh previous version.
I can't exactly look at the error cause I don't have the map editor in my laptop.
Yet, I fixed it I think, you should push a update for that too.
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on December 23rd, 2015, 02:58 PM
Major Update - v1.2.8
Code: [Select]
- Changelog - v1.2.8
- ► Fixed locations as the database was bugged
- ► Added /settime [hour] [minute] and /setweather [id] to set weather & time.
- ► Added object control in object selection menu, use page up/down to move object higher/lower and arrow up/down to bring it near or far.
- ► Added commands to get a list of all maps & locations. /getmaps & /getlocs
- ► Changed the location of object selection menu
- ► Added /view command to switch immediately to any object ID supplied when in object selection menu
- ► Added commands /deletemap [name] and /deleteloc [name] to delete any map or location from database

Check out the changelog above, too tired to write anything now, everything is fixed and now working, enjoy the complete control over everything now! ;)

Special thanks to @Castiel for PMing me alot of suggestions and reporting a few issues!

Do not forget to report any bugs/suggestions.

~ Regards,
~ Doom_Kill3R!
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on February 8th, 2016, 03:05 PM
Major Update - v1.2.9
Code: [Select]
- Changelog - v1.2.9
- ► Now supports XML outputs!
- ► Fixed /desall, not removing all objects.

Tadah! Is there even something to explain? Nope! Now you guys can not only have CreateObject outputs but also XML outputs! Just finish off your map and use /exportmap then head over to /scripts/Maps/XML_[your_map_name].xml, copy and paste it right into /store/maps/ and DONE!

@Xmair suggested this long ago and now its finally here. I would like to specially thank @Thijn for helping me out in testing and debugging as we both failed to calculate the rotations perfectly for XML from Quaternion and Eulers but in the end success achieved. Download link updated on first post.

~ Regards
Doom_Kill3R
Title: Re: [ #D~ Tools ] Map Editor
Post by: Xmair on February 8th, 2016, 03:09 PM
Regards*
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on February 8th, 2016, 03:11 PM
Quote from Xmair on February 8th, 2016, 03:09 PM
Regards*
Would have been better to find a more reasonable mistake :D
Title: Re: [ #D~ Tools ] Map Editor
Post by: KAKAN on February 8th, 2016, 03:28 PM
Quote from Doom_Kill3R on February 8th, 2016, 03:11 PM
Quote from Xmair on February 8th, 2016, 03:09 PM
Regards*
Would have been better to find a more reasonable mistake :D
Hehe

Anyways, nice work! I wanted that XML thing :) Awesome work mate!
Title: Re: [ #D~ Tools ] Map Editor
Post by: Xmair on February 8th, 2016, 03:43 PM
Code: [Select]
AN ERROR HAS OCCURED [cannot open file]

CALLSTACK
*FUNCTION [WriteTextToFile()] FileHandler.addon line [28]
*FUNCTION [setXMLBase()] FileHandler.addon line [55]
*FUNCTION [onPlayerCommand()] Editor.nut line [382]

LOCALS
[text] "<?xml version="1.0" encoding="ASCII" ?>
<itemlist>
"
[path] "scripts/Maps/XML_xdd.xml"
[this] TABLE
[mapFile] "xdd"
[this] TABLE
[C_VIEWLOC] INSTANCE
[C_PLOC] INSTANCE
[autoSave] true
[mapData] ""
[text] NULL
[cmd] "exportmap"
[player] INSTANCE
[this] TABLE
Do we need to make all the files manually?
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on February 8th, 2016, 03:57 PM
You don't need to make files, you must have a folder inside 'scripts' and name it 'Maps'. Your directory should be like this:
Code: [Select]
- Root Directory
    - scripts
        - Maps
    - Editor.nut
    - FileHandler.addon
    - Freeview.addon
    - locations.sqlite
    - Maps.sqlite
Title: Re: [ #D~ Tools ] Map Editor
Post by: [Elv]Woodland on February 9th, 2016, 01:36 PM
Awesome Work i was really waiting for this.
Thanks Alot Both of you :D
Title: Re: [ #D~ Tools ] Map Editor
Post by: Buddy on February 21st, 2016, 05:38 AM
(https://i.imgsafe.org/f87a63a.png)
I am having this problem.
Line -121 is:
(click to show/hide)
// =========================================== DATABASE ============================================
   Maps <- SQLite_Open( "scripts/Maps.sqlite" );
   db <- SQLite_Open( "scripts/locations.sqlite" );
Title: Re: [ #D~ Tools ] Map Editor
Post by: KAKAN on February 21st, 2016, 05:46 AM
Quote from Buddy on February 21st, 2016, 05:38 AM
(https://i.imgsafe.org/f87a63a.png)
I am having this problem.
Line -121 is:
(click to show/hide)
// =========================================== DATABASE ============================================
   Maps <- SQLite_Open( "scripts/Maps.sqlite" );
   db <- SQLite_Open( "scripts/locations.sqlite" );
See the starting of the topic. You forgot the required plugins.
Title: Re: [ #D~ Tools ] Map Editor
Post by: Buddy on February 21st, 2016, 06:06 AM
Thanks working :D
Title: Re: [ #D~ Tools ] Map Editor
Post by: Buddy on February 21st, 2016, 08:13 AM
I need some help!
I have create some fight areas but i  can't add them in my other server can  @Doom_killr can you tell me how i add????
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on February 21st, 2016, 08:30 AM
Quote from Buddy on February 21st, 2016, 08:13 AM
I need some help!
I have create some fight areas but i  can't add them in my other server can  @Doom_killr can you tell me how i add????
Sorry I can't help you.
Title: Re: [ #D~ Tools ] Map Editor
Post by: KAKAN on February 21st, 2016, 08:30 AM
Quote from Buddy on February 21st, 2016, 08:13 AM
I need some help!
I have create some fight areas but i  can't add them in my other server can  @Doom_killr can you tell me how i add????
Head to the Maps folder which is inside script folder of the editor, there should be an XML file. Put that in your server's map's folder. The map folder should be located at: your_serv_dir/store/maps

There's an other way too, but it's not for you
Title: Re: [ #D~ Tools ] Map Editor
Post by: Buddy on February 21st, 2016, 11:27 AM
Quote from KAKAN on February 21st, 2016, 08:30 AM
Quote from Buddy on February 21st, 2016, 08:13 AM
I need some help!
I have create some fight areas but i  can't add them in my other server can  @Doom_killr can you tell me how i add????
Head to the Maps folder which is inside script folder of the editor, there should be an XML file. Put that in your server's map's folder. The map folder should be located at: your_serv_dir/store/maps

There's an other way too, but it's not for you
Its not showing me any XML file :(
Title: Re: [ #D~ Tools ] Map Editor
Post by: Anik on February 22nd, 2016, 06:06 AM
Quote from Buddy on February 21st, 2016, 11:27 AM
Quote from KAKAN on February 21st, 2016, 08:30 AM
Quote from Buddy on February 21st, 2016, 08:13 AM
I need some help!
I have create some fight areas but i  can't add them in my other server can  @Doom_killr can you tell me how i add????
after creating the objects do /exportmap
Head to the Maps folder which is inside script folder of the editor, there should be an XML file. Put that in your server's map's folder. The map folder should be located at: your_serv_dir/store/maps

There's an other way too, but it's not for you
Its not showing me any XML file :(
do /exportmap after creating the objects
Title: Re: [ #D~ Tools ] Map Editor
Post by: RDXing_KR on March 24th, 2016, 10:46 AM
can i have Another link of download please
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on March 24th, 2016, 10:55 AM
The link is still working. Hopefully another user will create a mirror for you.
Title: Re: [ #D~ Tools ] Map Editor
Post by: KAKAN on March 24th, 2016, 02:21 PM
Quote from ProToza_RD on March 24th, 2016, 10:46 AM
can i have Another link of download please
There you go:
Mirror #1( Mediafire ) : http://www.mediafire.com/download/6q3cdksm6by33b5/Editor_v1.2.9.zip
Mirror #2( Dropbox ) : https://www.dropbox.com/s/3y3tg5rs7gocg0z/Editor%20v1.2.9.zip?dl=0
Title: Re: [ #D~ Tools ] Map Editor
Post by: RDXing_KR on March 30th, 2016, 08:00 AM
Quote from KAKAN on March 24th, 2016, 02:21 PM
Quote from ProToza_RD on March 24th, 2016, 10:46 AM
can i have Another link of download please
There you go:
Mirror #1( Mediafire ) : http://www.mediafire.com/download/6q3cdksm6by33b5/Editor_v1.2.9.zip
Mirror #2( Dropbox ) : https://www.dropbox.com/s/3y3tg5rs7gocg0z/Editor%20v1.2.9.zip?dl=0
Thank You
Title: Re: [ #D~ Tools ] Map Editor
Post by: King on June 12th, 2016, 09:49 AM
I'm getting Plugin error
>> 'plugins/sqlite-win64.dll' plugin is for incompatible API version 0.0 (current is 2.0).

Title: Re: [ #D~ Tools ] Map Editor
Post by: Thijn on June 12th, 2016, 10:01 AM
Update your plugins.
Title: Re: [ #D~ Tools ] Map Editor
Post by: King on June 12th, 2016, 10:40 AM
Im using 64 bit plugins of this http://forum.vc-mp.org/?topic=33.0 . All those seem updated .

DoomKiller gave this link  http://forum.vc-mp.org/?topic=420.0 in needed stuff . That plugin not working.
Title: Re: [ #D~ Tools ] Map Editor
Post by: . on June 12th, 2016, 10:41 AM
Quote from King on June 12th, 2016, 10:40 AM
DoomKiller gave this link  http://forum.vc-mp.org/?topic=420.0 in needed stuff . That plugin not working.
Look again.
Title: Re: [ #D~ Tools ] Map Editor
Post by: KAKAN on June 12th, 2016, 10:44 AM
Quote from Thijn on June 12th, 2016, 10:01 AM
Update your plugins.
What about the textdraws? They're still server-side,
Title: Re: [ #D~ Tools ] Map Editor
Post by: King on June 12th, 2016, 10:52 AM
Quote from . on June 12th, 2016, 10:41 AM
Quote from King on June 12th, 2016, 10:40 AM
DoomKiller gave this link  http://forum.vc-mp.org/?topic=420.0 in needed stuff . That plugin not working.
Look again.
Not Noticed new one , Script loading  but with  no print statements which means script not working.

My file (http://files.thijn.ovh/img/6657030e7b2866d18d9ecca1614d63cf/Editor.7z)(http://files.thijn.ovh/download/6657030e7b2866d18d9ecca1614d63cf/Editor.7z)
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on June 12th, 2016, 12:49 PM
SLC doesn't want to update his SQLite module with the latest server version so use the server version 04rel003 to use the editor.
Title: Re: [ #D~ Tools ] Map Editor
Post by: . on June 12th, 2016, 12:53 PM
Quote from Doom_Kill3R on June 12th, 2016, 12:49 PM
SLC doesn't want to update his SQLite module with the latest server version...
As I said. Check again.
Quote from . on June 12th, 2016, 10:41 AM
Look again.
Title: Re: [ #D~ Tools ] Map Editor
Post by: King on June 12th, 2016, 02:45 PM
Im getting this can anyone say where wrong it went? i can fix it myself
(http://s33.postimg.org/rrcykb3rf/New_Bitmap_Image.jpg)(http://postimg.org/image/rrcykb3rf/)
Title: Re: [ #D~ Tools ] Map Editor
Post by: . on June 12th, 2016, 03:03 PM
Quote from King on June 12th, 2016, 02:45 PM
Im getting this can anyone say where wrong it went? i can fix it myself
Download the new binaries when made available http://forum.vc-mp.org/?topic=420.msg22919#msg22919
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on June 12th, 2016, 07:11 PM
Update - v1.3
Code: [Select]
-    Changelog - v1.3
-    ► Updated to latest server version
-    ► Fixed a few very minor bugs
-    ► Added client-sided gui labels

Well, nothing much to say, enjoy ;)

(http://i.imgur.com/rWeK7rU.jpg)

~ Regards,
~ Doom_Kill3R!
Title: Re: [ #D~ Tools ] Map Editor
Post by: KAKAN on June 12th, 2016, 07:24 PM
Code: [Select]
Fixed a few very minor bugs
Can you tell me what were the bugs? Just curious to know as I myself didn't have any bugs.
Title: Re: [ #D~ Tools ] Map Editor
Post by: . on June 12th, 2016, 07:26 PM
Quote from KAKAN on June 12th, 2016, 07:24 PM
Can you tell me what were the bugs? Just curious to know as I myself didn't have any bugs.
Compare the files and see the differences(http://lmgtfy.com/?q=file+diff). Some changes are simply too small and too many to keep track of. And simply can't be explained. For example, you add an extra if statement to check if you received the correct type. That's a fix/improvement where that's not worthy to be documented. And you can always compare files to see the difference.
Title: Re: [ #D~ Tools ] Map Editor
Post by: Finch Real on June 13th, 2016, 12:18 AM
Quote from . on June 12th, 2016, 07:26 PM
Quote from KAKAN on June 12th, 2016, 07:24 PM
Can you tell me what were the bugs? Just curious to know as I myself didn't have any bugs.
Compare the files and see the differences(http://lmgtfy.com/?q=file+diff). Some changes are simply too small and too many to keep track of. And simply can't be explained. For example, you add an extra if statement to check if you received the correct type. That's a fix/improvement where that's not worthy to be documented. And you can always compare files to see the difference.
Hahahhaha
Quote from Doom_Kill3R on June 12th, 2016, 07:11 PM
Update - v1.3
Code: [Select]
-    Changelog - v1.3
-    ► Updated to latest server version
-    ► Fixed a few very minor bugs
-    ► Added client-sided gui labels

Well, nothing much to say, enjoy ;)

(http://i.imgur.com/rWeK7rU.jpg)

~ Regards,
~ Doom_Kill3R!
Cool job once again @Doom
Title: Re: [ #D~ Tools ] Map Editor
Post by: [Serious]Sam on July 7th, 2016, 02:06 PM
Nice, but you can't select objects without collision so I added this cmds)))
Code: [Select]
else if( cmd == "allobjects" || cmd == "objects" || cmd == "getobjects" )
{
    for( local i = 0; i < objCreated; i++ )
{
local obj = FindObject(i);
if( obj ) MessagePlayer( "[#00CC00][OBJECT]: [#ffffff]Object model: " + obj.Model + " Object ID: "+ obj.ID , player );
        }
}

else if( cmd == "selectobject" )
{
    if(text)
{
   local obj = FindObject( text.tointeger() );
       local plr = FindPlayer( player.ID );
       Object[ plr.ID ] = obj;
       pData[ player.ID ].Editing = true;
       MessagePlayer( "[#00CC00][SELECT]: [#ffffff]Selected object " + text.tointeger() , player );
       return 1;
}
else
    MessagePlayer( "[#00CC00][SELECT]: [#ffffff]/selectobject [ID] ", player );
}
For map with small count of objects)))
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on July 7th, 2016, 04:15 PM
Nice addition, I'll surely keep that in the future versions with your credits! ;)
Title: Re: [ #D~ Tools ] Map Editor
Post by: EK.IceFlake on July 7th, 2016, 04:51 PM
I think you should getplayeraimpos and then find the closest object @Doom_Kill3R
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on July 7th, 2016, 05:06 PM
Quote from ext-d.CrystalBlue on July 7th, 2016, 04:51 PM
I think you should getplayeraimpos and then find the closest object @Doom_Kill3R
Some of the bigger objects are not having collisions and thus camera mode (freeview script) gets in handy to stay at the top, in that case you are not aiming so your idea won't work.
Title: Re: [ #D~ Tools ] Map Editor
Post by: [Serious]Sam on July 7th, 2016, 09:02 PM
Quote from Doom_Kill3R on July 7th, 2016, 04:15 PM
Nice addition, I'll surely keep that in the future versions with your credits! ;)
You know, i can add more helping commands or bind keys like this, but i started learning the Squirrel and SQLiteDB 4 days ago)
And that's some easy for me because i have some experience from HTML, C++, C, Pascalshit))) If you need some help or just wanna play together text me)))
Title: Re: [ #D~ Tools ] Map Editor
Post by: [Serious]Sam on July 7th, 2016, 09:03 PM
And yeah, your Editor it's a good thing, it makes so easy to add objects on the map, thank you:D :D ;)
Title: Re: [ #D~ Tools ] Map Editor
Post by: Omar on July 10th, 2016, 02:03 PM
Quote from [Serious]Sam on July 7th, 2016, 02:06 PM
Nice, but you can't select objects without collision so I added this cmds)))
Code: [Select]
else if( cmd == "allobjects" || cmd == "objects" || cmd == "getobjects" )
{
    for( local i = 0; i < objCreated; i++ )
{
local obj = FindObject(i);
if( obj ) MessagePlayer( "[#00CC00][OBJECT]: [#ffffff]Object model: " + obj.Model + " Object ID: "+ obj.ID , player );
        }
}

else if( cmd == "selectobject" )
{
    if(text)
{
   local obj = FindObject( text.tointeger() );
       local plr = FindPlayer( player.ID );
       Object[ plr.ID ] = obj;
       pData[ player.ID ].Editing = true;
       MessagePlayer( "[#00CC00][SELECT]: [#ffffff]Selected object " + text.tointeger() , player );
       return 1;
}
else
    MessagePlayer( "[#00CC00][SELECT]: [#ffffff]/selectobject [ID] ", player );
}
For map with small count of objects)))
OMG dude I came here to suggest that and you did it! Thank you very much. Waiting for this to be in the official script :D :D :D.
Title: Re: [ #D~ Tools ] Map Editor
Post by: Omar on July 20th, 2016, 07:00 PM
At line 725 you forgot "local i = ......." so it outputs an error. I fixed it myself but I'm posting to inform :D
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on July 20th, 2016, 10:02 PM
Update - v1.3.2
Code: [Select]
-   Changelog - v1.3.2
-   ► Fixed /desall @ Thanks to Omar for pointint it out!
-   ► Fixed /closemap working as savemap; Note that if you map but didn't save and did closemap, changes will be lost!
-   ► Added /selectobject || /editobject to edito the object ID specified; Useful for objects which can't be shot/collided @ Idea by [Serious]Sam.
-   ► Added /objects || /allobjects to get a list of every object created with its ID and model @ Idea by [Serious]Sam.

Oh damn another update.... oops :D

Well, another step to improve this resource, hope you guys take the most advantage of it and enjoy mapping!

First post link updated!

~ Regards,
~ Doom_Kill3R!
Title: Re: [ #D~ Tools ] Map Editor
Post by: KAKAN on July 21st, 2016, 10:03 AM
This updated version is for 04rel04 or 03?
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on July 21st, 2016, 10:13 AM
Quote from Doom_Kill3R on June 12th, 2016, 07:11 PM
Update - v1.3
Code: [Select]
-    Changelog - v1.3
-    ► Updated to latest server version
-    ► Fixed a few very minor bugs
-    ► Added client-sided gui labels
Does that question make sense? Anyway, yes the editor works with the latest server version that is 04rel004.
Title: Re: [ #D~ Tools ] Map Editor
Post by: kennedyarz on December 3rd, 2016, 01:16 AM
(http://i.imgur.com/DKGAIZY.png)
(http://i.imgur.com/fjWStPH.png)
 
error in?
Title: Re: [ #D~ Tools ] Map Editor
Post by: Xmair on December 3rd, 2016, 05:06 AM
I don't understand why you're loading 2 SQLite plugins? Stick to one.
Title: Re: [ #D~ Tools ] Map Editor
Post by: EK.IceFlake on December 3rd, 2016, 05:20 AM
SLC updated his SQLite plugin to make it compatible with the official plugin. However, in the process, it became incompatible with the previous plugin versions.
Title: Re: [ #D~ Tools ] Map Editor
Post by: kennedyarz on December 17th, 2016, 08:36 PM
Oh it's working perfectly recommendation:
It is necessary that when you begin to decorate, you freeze. To move the object better. And when you ctrl the object is placed and you thaw
Title: Re: [ #D~ Tools ] Map Editor
Post by: AdrenAline on March 16th, 2017, 02:57 AM
Tutorial on how to install?
I install it the way it says in .txt and it does not work.....
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on March 16th, 2017, 05:39 AM
Quote from AdrenAline on March 16th, 2017, 02:57 AM
Tutorial on how to install?
I install it the way it says in .txt and it does not work.....
Can you describe what's the problem and upto where it works. Have you placed the files correctly and the required plugins.
Title: Re: [ #D~ Tools ] Map Editor
Post by: kennedyarz on March 16th, 2017, 01:01 PM
Quote from AdrenAline on March 16th, 2017, 02:57 AM
Tutorial on how to install?
I install it the way it says in .txt and it does not work.....
How Install(https://youtu.be/LXBoy2CBJ44)
Title: Re: [ #D~ Tools ] Map Editor
Post by: AdrenAline on March 18th, 2017, 02:49 AM
I followed the steps of his tutorial :/
(http://image.prntscr.com/image/1efe218a24a44e70882b8176d6944858.png)
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on March 18th, 2017, 04:22 AM
Download the SQLite plugin, add it in server.cfg and then run the editor.

You won't be given support in this topic on how to add plugins since that's irrelevant to the topic and it already got to 8 pages.
Title: Re: [ #D~ Tools ] Map Editor
Post by: kennedyarz on March 18th, 2017, 03:49 PM
Code: [Select]
Paste in you server.cfg

gamemode DM
plugins announce04rel32 xmlconf04rel32 squirrel04rel32 sqlite04rel32 sockets04rel32 ini04rel32 hashing04rel32
port 8192
sqgamemode scripts/main.nut

you use system  64 ? here

gamemode DM
plugins announce04rel64 xmlconf04rel64squirrel04rel64 sqlite04rel64 sockets04rel64 ini04rel64 hashing04rel64
port 8192
sqgamemode scripts/main.nut
Title: Re: [ #D~ Tools ] Map Editor
Post by: AdrenAline on March 31st, 2017, 01:30 AM
help pls

(http://image.prntscr.com/image/7113e260196c455e9f985268996840a6.png)
Title: Re: [ #D~ Tools ] Map Editor
Post by: Luis_Labarca on March 31st, 2017, 02:00 AM
Quote from AdrenAline on March 31st, 2017, 01:30 AM
help pls

(http://image.prntscr.com/image/7113e260196c455e9f985268996840a6.png)
usage /loadmap [Name Map]
Title: Re: [ #D~ Tools ] Map Editor
Post by: AdrenAline on March 31st, 2017, 02:18 AM
/loadmap test
error map no exist
Title: Re: [ #D~ Tools ] Map Editor
Post by: Luis_Labarca on March 31st, 2017, 06:01 AM
Quote from AdrenAline on March 31st, 2017, 02:18 AM
/loadmap test
error map no exist
usage /newmap test
Title: Re: [ #D~ Tools ] Map Editor
Post by: AdrenAline on March 31st, 2017, 06:50 PM
Quote from Luis_Labarca on March 31st, 2017, 06:01 AM
Quote from AdrenAline on March 31st, 2017, 02:18 AM
/loadmap test
error map no exist
usage /newmap test
ty your are best :)
Title: Re: [ #D~ Tools ] Map Editor
Post by: Razor. on April 2nd, 2017, 07:45 PM
Works :D
Title: Re: [ #D~ Tools ] Map Editor
Post by: Yankee on August 8th, 2017, 02:14 PM
I can't use /exportmap command,it isn't work.If i type this command,nothing happens.Please help me.
Title: Re: [ #D~ Tools ] Map Editor
Post by: kennedyarz on August 9th, 2017, 04:21 PM
Quote from Yankee on August 8th, 2017, 02:14 PM
I can't use /exportmap command,it isn't work.If i type this command,nothing happens.Please help me.
Make a new topic, but take note of this, place the IMPACT font underline it and then change its layout to the maximum. So that people can see more, even a blind man. You already know how to do it
Title: Re: [ #D~ Tools ] Map Editor
Post by: Yankee on August 10th, 2017, 10:34 AM
Quote from kennedyarz on August 9th, 2017, 04:21 PM
Quote from Yankee on August 8th, 2017, 02:14 PM
I can't use /exportmap command,it isn't work.If i type this command,nothing happens.Please help me.
Make a new topic, but take note of this, place the IMPACT font underline it and then change its layout to the maximum. So that people can see more, even a blind man. You already know how to do it
We used same size layout.What is your problem ?Did I do something wrong ?
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on August 10th, 2017, 11:05 AM
Make sure you have your map opened and there is something actually mapped. Afterwards make sure that when you type the exportmap command you wait for a success message. Then you can take the resulted outputs from the Maps/MapName folder.
Title: Re: [ #D~ Tools ] Map Editor
Post by: Yankee on August 11th, 2017, 09:33 AM
Quote from Doom_Kill3R on August 10th, 2017, 11:05 AM
Make sure you have your map opened and there is something actually mapped. Afterwards make sure that when you type the exportmap command you wait for a success message. Then you can take the resulted outputs from the Maps/MapName folder.
Problem is solved,thanks.
Title: Re: [ #D~ Tools ] Map Editor
Post by: Xmair on August 12th, 2017, 04:35 PM
@Doom_Kill3R
In the "allmaps" and "alllocs" command, the first map/loc won't be listed. To fix this, use:
Code: [Select]
else if( cmd == "allmaps" || cmd == "maps" || cmd == "getmaps" )
{
local listQuery = QuerySQL( Maps, "SELECT * FROM sqlite_master WHERE type='table'" );
local count = 0;
while ( GetSQLColumnData( listQuery, 0 ) ) {
count++;
MessagePlayer( "[#00CC00][MAP#" + count + "]: [#FFFFFF]" + GetSQLColumnData( listQuery, 1 ), player );
GetSQLNextRow( listQuery );
}
if( count == 0 ) return MessagePlayer( "[#00CC00][ERROR]: [#FFFFFF]No maps to list!", player );
}

else if( cmd == "alllocs" || cmd == "locs" || cmd == "getlocs" )
{
local listQuery = QuerySQL( db, "SELECT * FROM `Gotoloc`" );
local count = 0;
while ( GetSQLColumnData( listQuery, 0 ) ) {
count++;
MessagePlayer( "[#00CC00][LOC#" + count + "]: [#FFFFFF]" + GetSQLColumnData( listQuery, 0 ), player );
GetSQLNextRow( listQuery );
}
FreeSQLQuery( listQuery );
if( count == 0 ) return MessagePlayer( "[#00CC00][ERROR]: [#FFFFFF]No locations to list!", player );
}
The problem was caused because you were using
Code: [Select]
while ( GetSQLNextRow( listQuery ) )
which would go to the next row without printing the first one.
Title: Re: [ #D~ Tools ] Map Editor
Post by: Doom_Kill3R on August 12th, 2017, 05:13 PM
No need to do such a big change, it can be simply fixed with a do statement.

Code: [Select]
else if( cmd == "alllocs" || cmd == "locs" || cmd == "getlocs" )
{
    local listQuery = QuerySQL( db, "SELECT * FROM `Gotoloc`" );
    local count = 0;
    do {
        count++;
        MessagePlayer( "[#00CC00][LOC#" + count + "]: [#FFFFFF]" + GetSQLColumnData( listQuery, 0 ), player );
    }
    while ( GetSQLNextRow( listQuery ) )
    FreeSQLQuery( listQuery );
    if( count == 0 ) return MessagePlayer( "[#00CC00][ERROR]: [#FFFFFF]No locations to list!", player );
}
Title: Re: [ #D~ Tools ] Map Editor
Post by: =RK=MarineForce on September 22nd, 2018, 10:36 PM
@Doom_Killer There is a bug, when i added object and trying to select it it shows Invaild id, its true ID of that,

[#00CC00][MAP]: [#ffffff]Created object 535
[#00CC00][ERROR]: [#FFFFFF]Invalid object ID!