19.04.2012, 15:22
(
Last edited by Drebin; 05/09/2015 at 05:37 PM.
)
v1.0 - 19.04.2012
• 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 | |||
| Moves an object on the command associated axis | |||
| Moves all objects on the command associated axis | |||
| 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 |
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
- 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
Code:plugins sscanf
- 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
Drebin - coding and idea
DracoBlue - dini
****** - sscanf
ZeeX - zcmd
h02 - flyeditor base code