SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 19/04/2012, 03:22 PM   #1
Drebin
High-roller
 
Drebin's Avatar
 
Join Date: Oct 2010
Location: Germany
Posts: 1,164
Reputation: 560
Default DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf



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:

/openeditorOpens/Closes the editor
/createnewobjectCreates a new object
/deleteobjectDeletes an object
/deleteallobjectsDeletes 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
/nearestobjectGets the closes object to your position
/gotoobjectTeleports you to an object
/replaceobjectmodelReplaces an object with a new object model
/duplicateobjectDuplicates an object
/setobjectmaterialChanges the texture of an object
/setobjectposSets an object to an exact position
/editobjectModifies an object using the object editing tool
/selectobjectSelects an object by clicking on it
/flyeditorEnters the flyeditor editor mode
/saveobjectsSaves an object file
/loadobjectsLoads an object file
/exportobjectsExports an object file in the CreateObject() format
/editorcommandsShows the editor commands help
/editorsettingsShows the editor settings dialog to a player
/esettingshelpShows editor settings help
/toggleeditorCan 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
  1. Download the file (WinRar or similar program needed)
  2. Put 'sscanf2', 'zcmd' and 'dini' into your Pawno/Includes folder
  3. Put the objecteditor.pwn and objecteditor.amx into your filterscripts folder
  4. Put the 'ObjectEditor' folder into your scriptfiles directory
  5. Add 'objecteditor' to the filterscripts in your server.cfg
    Code:
    filterscripts objecteditor
  6. Add 'sscanf' to the plugins in your server.cfg
    Code:
    plugins sscanf
  7. Open the objecteditor.pwn and adjust the defines as you wish
  8. Compile the .pwn file
  9. 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
Y_Less - sscanf
ZeeX - zcmd
h02 - flyeditor base code

Last edited by Drebin; 05/09/2015 at 05:37 PM.
Drebin is offline   Reply With Quote
Old 19/04/2012, 03:27 PM   #2
TheMightyEddy
Banned
 
Join Date: Mar 2011
Posts: 303
Reputation: 7
Default Re: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf

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
TheMightyEddy is offline   Reply With Quote
Old 19/04/2012, 03:28 PM   #3
Drebin
High-roller
 
Drebin's Avatar
 
Join Date: Oct 2010
Location: Germany
Posts: 1,164
Reputation: 560
Default AW: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf

You can also drag the object with your mouse if you want to (/editobject [object]), but I will consider your idea .
__________________


GamerX - The SA-MP legend.
Online since 2006.

188.165.219.63:8800
www.gamerxserver.com
Drebin is offline   Reply With Quote
Old 19/04/2012, 03:31 PM   #4
TheMightyEddy
Banned
 
Join Date: Mar 2011
Posts: 303
Reputation: 7
Default Re: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf

Nevermind. I didn't know you can drag with your mouse! Awesome! And is this compatable with SA-MP 0.3d?
TheMightyEddy is offline   Reply With Quote
Old 19/04/2012, 03:34 PM   #5
Drebin
High-roller
 
Drebin's Avatar
 
Join Date: Oct 2010
Location: Germany
Posts: 1,164
Reputation: 560
Default AW: Re: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf

Quote:
Originally Posted by TheMightyEddy View Post
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.
__________________


GamerX - The SA-MP legend.
Online since 2006.

188.165.219.63:8800
www.gamerxserver.com
Drebin is offline   Reply With Quote
Old 19/04/2012, 03:34 PM   #6
IstuntmanI
High-roller
 
IstuntmanI's Avatar
 
Join Date: Mar 2009
Location: Romania
Posts: 1,862
Reputation: 370
Default Re: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf

Awesome.

Move it to Y_INI, is faster.

+
__________________


IstuntmanI is offline   Reply With Quote
Old 19/04/2012, 03:36 PM   #7
TheMightyEddy
Banned
 
Join Date: Mar 2011
Posts: 303
Reputation: 7
Default Re: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf

Do you think u can make compatable with 0.3d?
TheMightyEddy is offline   Reply With Quote
Old 19/04/2012, 03:38 PM   #8
IstuntmanI
High-roller
 
IstuntmanI's Avatar
 
Join Date: Mar 2009
Location: Romania
Posts: 1,862
Reputation: 370
Default Re: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf

Quote:
Originally Posted by TheMightyEddy View Post
Do you think u can make compatable with 0.3d?
It's imposible, dragging a object with mouse is possible only on 0.3e.
__________________


IstuntmanI is offline   Reply With Quote
Old 19/04/2012, 03:38 PM   #9
vassilis
High-roller
 
vassilis's Avatar
 
Join Date: Nov 2009
Location: Greece,Athens
Posts: 1,943
Reputation: 360
Default Re: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf

Quote:
Originally Posted by TheMightyEddy View Post
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..
vassilis is offline   Reply With Quote
Old 19/04/2012, 03:40 PM   #10
Deanx
Big Clucker
 
Deanx's Avatar
 
Join Date: Apr 2012
Posts: 123
Reputation: 3
Default Re: DrEdit - Ingame Object Editor | 0.3e+ | Save, load and export files | dini, zcmd & sscanf

Very Nice 10/10
__________________
Curta :http://www.********.com/xSanguenoZoio
Deanx is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] yEditor - InGame Object Editor ylleron Filterscripts 15 27/10/2013 09:43 PM
Ingame Object Creator Editor. Captain Price Help Archive 4 28/05/2011 01:10 PM
Help SA-MP Ingame Object-editor PRO>KOMP.< Server Support 14 03/01/2011 10:21 AM


All times are GMT. The time now is 03:28 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.