[Tool/Web/Other] Object mover - All in once
#1

Hey!
I've made a nice tool, with PHP. You can move objects (offsets). Example:

Input
Код:
CreateObject(18749, 5, 0, 0, 0, 0, 0, 0);
CreateObject(18749, 0, 5, 0, 0, 0, 0, 0);
CreateObject(18749, 0, 0, 5, 0, 0, 0, 0);
Settings
X: 0
Y: 5 (so that's +5)
Z: -1.5

Output
Код:
CreateObject(18749, 5, 5, -1.5, 0, 0, 0, 0);
CreateObject(18749, 0, 10, -1.5, 0, 0, 0, 0);
CreateObject(18749, 0, 0, 3.5, 0, 0, 0, 0);
Isn't that just great? :P

Download + Preview
Live demo: http://www.rl-rp.com/OM
Download:
Just a small script. Included in PHP BBcode tags. The file is named as "index.php" on the live demo, but you could cal it different, that doesn't matter.
PHP код:
<?php
    
if($_SERVER['REQUEST_METHOD'] == "POST")
    {
?>
<html>
  <head>
    <title>SA:MP Objects -> MOVED</title>
  </head>
  <body>
<?php
        $CreateObject_CODES 
explode("\n"nl2br($_POST['code']));
        
        foreach(
$CreateObject_CODES as $CreateObject)
        {
            list(
$modelid$X$Y$Z$rX$rY$rZ$DrawDistance) = explode(","$CreateObject);
            if(
strlen($_POST['X'])) $X = (float) $X $_POST['X'];
            if(
strlen($_POST['Y'])) $Y = (float) $Y $_POST['Y'];
            if(
strlen($_POST['Z'])) $Z = (float) $Z $_POST['Z'];
            echo 
"$modelid$X$Y$Z$rX$rY$rZ$DrawDistance";
        }
?>
  </body>
</html>
<?php
    
}
    else
    {
?>
<html>
  <head>
    <title>SA:MP Objects mover</title>
  </head>
  <body>
    <form name="pcode" id="pcode" method="post" action="<?=htmlentities($_SERVER['REQUEST_URI']);?>">
      <textarea id="code" name="code" cols="50" rows="20"></textarea><br /><br />
      X Offset: <input type="text" size="2" id="X" name="X" /><br />
      Y Offset: <input type="text" size="2" id="Y" name="Y" /><br />
      Z Offset: <input type="text" size="2" id="Z" name="Z" /><br /><br />
      <input type="submit" value="Generate" />
    </form>
  </body>
</html>
<?php
    
}
?>
Enjoy it.
Reply
#2

love you
Reply
#3

Let's say you have like an island in the water near San Fierro, but you want it moved to like, Los Santos, what do I need to do to find out the X,Y,Z inputs
Reply
#4

Quote:
Originally Posted by Memoryz
Посмотреть сообщение
Let's say you have like an island in the water near San Fierro, but you want it moved to like, Los Santos, what do I need to do to find out the X,Y,Z inputs
the XYZ displacements. It only offsets your coords, and it doesnt move them to a set position. If you know where you wanna place it, you can always do some math (:O) and figure out the correct offset for the position. Then you would have to do tweaking :P. It would take a bit of time, but if you get it right, then its worth it

EDIT: read fail

You can use /save and go to your GTASA user folder and use those coords. But after you do that, read above
Reply
#5

@Hal: Ehm no problem I guess . This script was easier then I expected.
@Memoryz: Hal'd explain it.
@Hal: See the first '@Hal:'
Reply
#6

Object mower.

Good tool, I've had these problems in the past a lot, especially when creating the haystack FS.
Reply
#7

WOW AWESOME MAN
Reply
#8

@Hiddos: What "mower". This moves object...
And thanks, to the rest... So actually only to wheelman, because he is the rest after Hiddos and Hal.
Reply
#9

01000010011101010110110101110000
Bump
Reply
#10

nice one
Reply
#11

Thank you too
Reply
#12

its nice, but cant you make it so that you can just enter a new X,Y,Z position instead of an offset ?
Reply
#13

This is going to be a very useful tool, great job.
Thanks.
Reply
#14

Quote:
Originally Posted by gamer931215
Посмотреть сообщение
its nice, but cant you make it so that you can just enter a new X,Y,Z position instead of an offset ?
Ehm, so here's an example:

Input:
Код:
CreateObject(0, 0, 0, 0, 0, 0, 0, 0);
CreateObject(0, 10, 10, 10, 0, 0, 0, 0);
If you would choose for "New X position = 5" the output would be this:

Код:
CreateObject(0, 5, 0, 0, 0, 0, 0, 0);
CreateObject(0, 5, 10, 10, 0, 0, 0, 0);
So then you'll have all the objects on exact one place (At least on X. If you would do X=5, Y=5, Z=5, all objects would be on one place).
Reply
#15

Quote:
Originally Posted by Kwarde
Посмотреть сообщение
Ehm, so here's an example:
...
I mean if you have an island as example in the north, and i want it to be on the south of the map, you need to "guess" or calculate yourself what the distance is between the coordinates, and then set the map to y +1400 as example in order to move.

Cant you just make it that you can enter the new map coordinates of where you want your map to move to.
Reply
#16

Anyone who's able to do it: Please remove this thread.
Reply
#17

Quote:
Originally Posted by Kwarde
Посмотреть сообщение
Anyone who's able to do it: Please remove this thread.
Why if i may ask ?
its pretty good
Reply
#18

Quote:
Originally Posted by gamer931215
Посмотреть сообщение
Why if i may ask ?
its pretty good
But like you and Hiddos've said, yours is better.
Reply
#19

Quote:
Originally Posted by Kwarde
Посмотреть сообщение
But like you and Hiddos've said, yours is better.
Who cares, its still good though only maybe you can optimise it a bit by adding the coordination system
Reply
#20

Yes, I was just thinking of an integration thing.
Your script and mine in one. Yes or No. However I'll place mine back...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)