Ace_Gambit Posted May 15, 2008 Share Posted May 15, 2008 (edited) Drag and Drop 1.1 resource for MTA:SA DM DP2 by Ace_Gambit This resource allows you to drag and drop MTA elements almost like in the MTA Race editor. You can run this resource as part of your own script or stand-alone. Features: - Old style drag and dropping of MTA elements - Supports objects and vehicles (possibly even pickups but hasn't been tested) - Free movement when cursor is hidden - Rotate elements over x and z-axis Download: https://community.multitheftauto.com/index.php?p= ... ils&id=137 Version 1.1: - Added ability to rotate elements! - Added world rotation of selected element (toggle with F2) - Fixed README (missing controls and typo's) Usage: Drop the archive in your resource folder and start it. The original distribution is designed to run as stand-alone. This means that you can run it parallel to your favourite map editor resource. In stand-alone modus players are automatically registered as editors. In order to run this resource as part of your own script you must edit the meta.xml. Change the "runstandalone" setting (meta.xml) to "false". The resource will not register newly joined players as editors anymore. You will have to do it in your script instead using one of the following export functions. Exports: - regPlayerAsEditor(element player) - unregPlayerAsEditor Controls: - F1 toggles drag and drop mode on (requires the cursor to be visible!) or off * - F2 toggles world position/rotation of the selected element - Mouse1 selects an MTA element (press Mouse1 again to drop the MTA element) - LSHIFT (hold) snaps the selected MTA element to the world or any object beneath - F3 toggles rotation controls on or off Rotation: ** - Mouse2 (hold) + Arrow left/right smoothly rotates the element over the x-axis - Mouse2 (hold) + Arrow down/up smoothly rotates the element over the z-axis - Scroll up/down fast rotation over the z-axis - LCTRL (hold) + Scroll up/down fast rotation over the x-axis - SPACE resets the element to its default rotation The dragging is pretty straight forward. Just move your mouse to anywhere on the screen. Free movement: This resource supports dragging without the cursor being visible. This comes in handy if you want to move the object high into the air with a jetpack or something. As long as drag and drop mode is enabled you can toggle the cursor on and off. It has to be visible when you want to select a new MTA element though. Note: When you select a vehicle all passengers are thrown out. This is to prevent bugs when the client script is temporary disabling the element's collision. Also be aware that other players can not select the same MTA element or see an element being moved by a remote player. The MTA element is synchronized again when the remote player drops it. * When drag and drop is enabled a yellow corona and red arrow appear. ** In order to prevent interference with running resources the rotation controls are toggable (F3). Credits to the MTA team Edited May 16, 2008 by Guest Link to comment
Ace_Gambit Posted May 15, 2008 Author Share Posted May 15, 2008 (edited) Drag and Drop 1.1 resource for MTA:SA DM DP2 by Ace_Gambit This resource allows you to drag and drop MTA elements almost like in the MTA Race editor. You can run this resource as part of your own script or stand-alone. Features: - Old style drag and dropping of MTA elements - Supports objects and vehicles (possibly even pickups but hasn't been tested) - Free movement when cursor is hidden - Rotate elements over x and z-axis Download: https://community.multitheftauto.com/index.php?p= ... ils&id=137 Version 1.1: - Added ability to rotate elements! - Added world rotation of selected element (toggle with F2) - Fixed README (missing controls and typo's) Usage: Drop the archive in your resource folder and start it. The original distribution is designed to run as stand-alone. This means that you can run it parallel to your favourite map editor resource. In stand-alone modus players are automatically registered as editors. In order to run this resource as part of your own script you must edit the meta.xml. Change the "runstandalone" setting (meta.xml) to "false". The resource will not register newly joined players as editors anymore. You will have to do it in your script instead using one of the following export functions. Exports: - regPlayerAsEditor(element player) - unregPlayerAsEditor Controls: - F1 toggles drag and drop mode on (requires the cursor to be visible!) or off * - F2 toggles world position/rotation of the selected element - Mouse1 selects an MTA element (press Mouse1 again to drop the MTA element) - LSHIFT (hold) snaps the selected MTA element to the world or any object beneath - F3 toggles rotation controls on or off Rotation: ** - Mouse2 (hold) + Arrow left/right smoothly rotates the element over the x-axis - Mouse2 (hold) + Arrow down/up smoothly rotates the element over the z-axis - Scroll up/down fast rotation over the z-axis - LCTRL (hold) + Scroll up/down fast rotation over the x-axis - SPACE resets the element to its default rotation The dragging is pretty straight forward. Just move your mouse to anywhere on the screen. Free movement: This resource supports dragging without the cursor being visible. This comes in handy if you want to move the object high into the air with a jetpack or something. As long as drag and drop mode is enabled you can toggle the cursor on and off. It has to be visible when you want to select a new MTA element though. Note: When you select a vehicle all passengers are thrown out. This is to prevent bugs when the client script is temporary disabling the element's collision. Also be aware that other players can not select the same MTA element or see an element being moved by a remote player. The MTA element is synchronized again when the remote player drops it. * When drag and drop is enabled a yellow corona and red arrow appear. ** In order to prevent interference with running resources the rotation controls are toggable (F3). Credits to the MTA team Edited May 16, 2008 by Guest Link to comment
laurens Posted May 16, 2008 Share Posted May 16, 2008 Looks like an awesome script! Maybe it's somehow possible to (pseudo-)synchronize the moving objects by having a timer send the position of the object every few seconds, and to make it go smooth the object should get moved by using the moveObject() function I can't seem to find the download link though! Link to comment
laurens Posted May 16, 2008 Share Posted May 16, 2008 Looks like an awesome script! Maybe it's somehow possible to (pseudo-)synchronize the moving objects by having a timer send the position of the object every few seconds, and to make it go smooth the object should get moved by using the moveObject() function I can't seem to find the download link though! Link to comment
Ace_Gambit Posted May 16, 2008 Author Share Posted May 16, 2008 Looks like an awesome script!Maybe it's somehow possible to (pseudo-)synchronize the moving objects by having a timer send the position of the object every few seconds, and to make it go smooth the object should get moved by using the moveObject() function I can't seem to find the download link though! Whoops, I edited my post and forgot to paste the link back again. It should be fixed now. And yea, I have been thinking of doing it that way (updating with the server every few seconds) but left it out for some reason. But maybe I'll do that later on. Link to comment
Ace_Gambit Posted May 16, 2008 Author Share Posted May 16, 2008 Looks like an awesome script!Maybe it's somehow possible to (pseudo-)synchronize the moving objects by having a timer send the position of the object every few seconds, and to make it go smooth the object should get moved by using the moveObject() function I can't seem to find the download link though! Whoops, I edited my post and forgot to paste the link back again. It should be fixed now. And yea, I have been thinking of doing it that way (updating with the server every few seconds) but left it out for some reason. But maybe I'll do that later on. Link to comment
aralmo Posted October 31, 2008 Share Posted October 31, 2008 This script is just amazing, how far you can go in MTA. I want to use it on my rpg system to customize your house with placeables. Nice work, keep it up! Link to comment
r0bin Posted December 10, 2009 Share Posted December 10, 2009 I'd love to use your script, but I think I'm doing something wrong. When I spawn an object, with offedit or map, I can't select it. I press F1 and click the object, but nothing happens. The description says that the cursor has te be visible, so I opened up the console with F8 and tried again, but nothing happens. I stopped freeroam UI (since it uses F1 for the freeroam menu), but still the same problem. I'm sure the resource is loaded. I have the feeling that I'm missing something stupid. Link to comment
Dark Dragon Posted December 10, 2009 Share Posted December 10, 2009 Drag and Drop 1.1 resource for MTA:SA DM DP2 I think that's what you missed Link to comment
r0bin Posted December 10, 2009 Share Posted December 10, 2009 D'oh! Is there a similar resource that works with the current release of MTA? I'd like to spawn and move objects server-side easily. The offedit and map resource aren't very user-friendly. Link to comment
Dark Dragon Posted December 10, 2009 Share Posted December 10, 2009 how about the map editor? Link to comment
r0bin Posted December 10, 2009 Share Posted December 10, 2009 how about the map editor? Unfortunately this allows normal players to edit the map too, and I don't want that. Link to comment
Dark Dragon Posted December 10, 2009 Share Posted December 10, 2009 shouldn't be to hard to change that, or just grab the code you need from it. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now