DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf -
Drebin - 19.04.2012
v1.0 - 19.04.2012
Functions
• Create, delete and modify objects ingame
• Move objects using commands or 0.3e object editor function
• Apply custom textures (models) to the objects
• Duplicate objects and "gotoobject" function
• Ingame options dialog, individual editor preference setting for each player
• MTA-like object editor "flycam" with activatable fadecross
• Save and load object files
• Export objects files in the CreateObject() format (can be restricted to RCON admins)
• Help dialogs explaining commands and settings
• Customizable defines for the server owner
• Text messages for info on actions done to an object
• Ability to restrict the editor to RCON admins or players who have been given permission by an RCON admin
Commands
Below is a list of all commands included in the filterscript:
/openeditor | Opens/Closes the editor |
/createnewobject | Creates a new object |
/deleteobject | Deletes an object |
/deleteallobjects | Deletes all object |
/setobjectxoffset | /setobjectyoffset | /setobjectzoffset |
| Moves an object on the command associated axis |
/setallobjectsxoffset | /setallobjectsyoffset | /setallobjectszoffset |
| Moves all objects on the command associated axis |
/setobjectxrotation | /setobjectyrotation | /setobjectzrotation |
| Sets the command associated rotation of an object |
/nearestobject | Gets the closes object to your position |
/gotoobject | Teleports you to an object |
/replaceobjectmodel | Replaces an object with a new object model |
/duplicateobject | Duplicates an object |
/setobjectmaterial | Changes the texture of an object |
/setobjectpos | Sets an object to an exact position |
/editobject | Modifies an object using the object editing tool |
/selectobject | Selects an object by clicking on it |
/flyeditor | Enters the flyeditor editor mode |
/saveobjects | Saves an object file |
/loadobjects | Loads an object file |
/exportobjects | Exports an object file in the CreateObject() format |
/editorcommands | Shows the editor commands help |
/editorsettings | Shows the editor settings dialog to a player |
/esettingshelp | Shows editor settings help |
/toggleeditor | Can be used by an RCON admin to allow a player to use the editor (-> see 'defines' category |
You can also type /editorcommands ingame to get a dialog with all commands.
Defines
pawn Code:
#define RCON_ADMINS_ONLY false
#define TOGGLED_ONLY false
#define USE_COMMAND_SHORTCUTS true
#define USE_MAX_CREATE_DISTANCE true
#define USE_MAX_MOVE_DISTANCE true
#define MAX_CREATE_DISTANCE 200.0
#define MAX_MOVE_DISTANCE 400.0
#define ALLOW_EXPORT_MAP_FILE false
#define ALLOW_EDIT_OBJECT_ON_DUPLICATE true
#define ALLOW_USE_MATERIAL_CHANGE_DIALOG true
#define ALLOW_EDIT_OBJECT_ON_CREATE true
#define ALLOW_KEEP_MATERIAL true
#define ALLOW_USE_CROSS true
#define ALLOW_TRANSFER_MATERIAL true
Explanation
- RCON_ADMINS_ONLY
This restricts the usage of the object editor to RCON admins. If a player who is not logged in as an RCON admin tries to open the editor, he will get an error message. If it's set to false, every user can use the object editor.
- TOGGLED_ONLY
If this is set to true, only players who have been given the permission to use the object editor by an RCON admin can use the object editor (/toggleeditor). However, if RCON_ADMINS_ONLY is also set to true, those players will not be able to use it. If TOGGLED_ONLY is set to false, users can use it without being given the permission.
- USE_COMMAND_SHORTCUTS
If this is set to true, users can use command shortcuts, so they do not have to type out the complete command (createnewobject -> /cno). Even if it's enabled, users can still use both command versions, normal and shortcutted version.
- USE_MAX_CREATE_DISTANCE
Restricts the distance a user can create an object in front of him. If set to false, the distance is unlimited.
- USE_MAX_MOVE_DISTANCE
Restricts the distance a user can move an object. If set to false, the distance is unlimited.
- MAX_CREATE_DISTANCE
Defines the max. distance a user can create an object in front of him. This will only be used if USE_MAX_CREATE_DISTANCE is set to true.
- MAX_MOVE_DISTANCE
Defines the max. distance a user can move an object. This will only be used if USE_MAX_MOVE_DISTANCE is set to true.
- ALLOW_EXPORT_MAP_FILE
If it's set to true, all users can export objects in the CreateObject() format. If set to false, only RCON admins can.
- ALLOW_EDIT_OBJECT_ON_CREATE
Allows the user to activate an option which automatically puts the EditObject() cross onto an object after creating it. If set to false, this option will be grayed out in the /editorsettings and he can not use this feature.
- ALLOW_EDIT_OBJECT_ON_DUPLICATE
Allows the user to activate an option which automatically puts the EditObject() cross onto an object after duplicating it. If set to false, this option will be grayed out in the /editorsettings and he can not use this feature.
- ALLOW_USE_MATERIAL_CHANGE_DIALOG
Allows the user to activate an option which replaces the /setobjectmaterial command with all it's parameters with a handy dialog. If set to false, this option will be grayed out in the /editorsettings and he can not use this feature.
The material changing dialog
- ALLOW_KEEP_MATERIAL
Allows the user to activate an option which keeps the custom texture on an object after changing the object's model. If set to false, this option will be grayed out in the /editorsettings and he can not use this feature.
- ALLOW_USE_CROSS
Allows the user to activate an option which puts a fade cross in the middle of the screen when they're in the flyeditor editor mode. If set to false, this option will be grayed out in the /editorsettings and he can not use this feature.
- ALLOW_TRANSFER_MATERIAL
Allows the user to activate an option which automatically transfers a custom texture to the object just being duplicated from it (read: the duplicated object gets the texture of it's "mother" object. If set to false, this option will be grayed out in the /editorsettings and he can not use this feature.
The settings dialog. If an option is grayed out, it has been disabled by the owner
Download
Current version:
v1.0.0 for SA-MP 0.3.7(12.06.2015)
• Sendspace
Installation
- Download the file (WinRar or similar program needed)
- Put 'sscanf2', 'zcmd' and 'dini' into your Pawno/Includes folder
- Put the objecteditor.pwn and objecteditor.amx into your filterscripts folder
- Put the 'ObjectEditor' folder into your scriptfiles directory
- Add 'objecteditor' to the filterscripts in your server.cfg
Code:
filterscripts objecteditor
- Add 'sscanf' to the plugins in your server.cfg
- Open the objecteditor.pwn and adjust the defines as you wish
- Compile the .pwn file
- Done!
Bugs
There are currently no found bugs.
However, if you find one, PLEASE REPORT IT TO ME! Either post a reply in this topic or
send me a PM
Suggestions
Suggestions are always welcome. If you have a suggestion, please let me know about it by posting here or sending me a PM.
Only this way the editor will continue growing.
However, there are some things I plan for the future:
- Support for Incognito's Streamer
- A y_ini Version
- Support for SetObjectMaterialText()
Changelog
Code:
-v1.0.0- (19.04.2012)
Initial release
Credits
Drebin - coding and idea
DracoBlue - dini
****** - sscanf
ZeeX - zcmd
h02 - flyeditor base code
Re: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf -
TheMightyEddy - 19.04.2012
You sir are great! I will test it later today but from what I can see from the x and y axis and rotation axis, is that how you move the object? Can you pls make a dialog box or something so when we press the arrows in keyboard, we can move the object without typing the coordinates?
Like this editor :
http://forum.sa-mp.com/showthread.ph...=object+editor
Or this:
http://forum.sa-mp.com/showthread.ph...=object+editor
AW: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf -
Drebin - 19.04.2012
You can also drag the object with your mouse if you want to (/editobject [object]), but I will consider your idea
.
Re: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf -
TheMightyEddy - 19.04.2012
Nevermind. I didn't know you can drag with your mouse! Awesome! And is this compatable with SA-MP 0.3d?
AW: Re: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf -
Drebin - 19.04.2012
Quote:
Originally Posted by TheMightyEddy
Nevermind. I didn't know you can drag with your mouse! Awesome! And is this compatable with SA-MP 0.3d?
|
No, only 0.3e and above.
Re: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf -
IstuntmanI - 19.04.2012
Awesome.
Move it to Y_INI, is faster.
+
Re: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf -
TheMightyEddy - 19.04.2012
Do you think u can make compatable with 0.3d?
Re: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf -
IstuntmanI - 19.04.2012
Quote:
Originally Posted by TheMightyEddy
Do you think u can make compatable with 0.3d?
|
It's imposible, dragging a object with mouse is possible only on 0.3e.
Re: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf -
vassilis - 19.04.2012
Quote:
Originally Posted by TheMightyEddy
Do you think u can make compatable with 0.3d?
|
No because the script is using the new 0.3e fuctions like EditObject which is only for 0.3e..
Re: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf -
Deanx - 19.04.2012
Very Nice 10/10
Re: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf -
TheMightyEddy - 19.04.2012
Oh okay. Can people using 0.3d client still be able to join when I'm using 0.3e server?
AW: Re: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf -
Drebin - 19.04.2012
Quote:
Originally Posted by TheMightyEddy
Oh okay. Can people using 0.3d client still be able to join when I'm using 0.3e server?
|
No. And this is not a thread for 0.3e discussion:P.
Wait till 0.3e is released, shouldn't take that long anymore.
Re: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf -
TheMightyEddy - 19.04.2012
Okay thx
Re: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf -
richardcor91 - 19.04.2012
I think you forgot to mention the "openeditor" command :P
I'm also building an object editor with flymode and I also had a problem with player facing angle after exit flymode, however, you can use this
https://sampforum.blast.hk/showthread.php?tid=274958
Anyway, nice work there man!
Re : DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf -
mehdi-jumper - 19.04.2012
Amazing !!
Re: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf -
BloodyEric - 19.04.2012
Great drebin! I will try it tomorrow - One suggestion: Make less CMDs, they are annoying while editing. Maybe a key opens a textdraw menu where you can click on the function you want?
Respuesta: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf -
[NVC]iTrevaS - 19.04.2012
Very Good 10 / 10 !!
Re: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf -
Hoss - 19.04.2012
Good job drebin
Re: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf -
Ballu Miaa - 19.04.2012
Damn 1000/1000 Fucking awesome work
Re: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf -
WarriorEd22 - 08.05.2012
Wow brother, you are good! I'm so happy 0.3e got released today!
Edit: Hmm it's sad that this doesn't work. I tried it but when I create an object, it doesn't show up and when I type /gotoobject (/goo) , it takes me to Blueberry Acres. I have all the plugins and stuff in the right folder and everything is configured. What can be wrong?