Object mover - All in once -
Kwarde - 21.04.2011
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.
Re: Object mover - All in once -
Hal - 21.04.2011
love you
Re: Object mover - All in once -
Memoryz - 21.04.2011
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
Re: Object mover - All in once -
Hal - 21.04.2011
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
Re: Object mover - All in once -
Kwarde - 22.04.2011
@Hal: Ehm no problem I guess

. This script was easier then I expected.
@Memoryz: Hal'd explain it.

@Hal: See the first '@Hal:'
Re: Object mover - All in once -
Hiddos - 22.04.2011
Object mo
wer.
Good tool, I've had these problems in the past a lot, especially when creating the haystack FS.
Re: Object mover - All in once -
wheelman_WM - 22.04.2011
WOW AWESOME MAN
Re: Object mover - All in once -
Kwarde - 22.04.2011
@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.
Re: Object mover - All in once -
Kwarde - 24.04.2011
01000010011101010110110101110000
Bump
Re: Object mover - All in once -
royal_king - 24.04.2011
nice one
Re: Object mover - All in once -
Kwarde - 24.04.2011
Thank you too
Re: Object mover - All in once -
gamer931215 - 24.04.2011
its nice, but cant you make it so that you can just enter a new X,Y,Z position instead of an offset ?
Re: Object mover - All in once -
Stigg - 24.04.2011
This is going to be a very useful tool, great job.
Thanks.
Re: Object mover - All in once -
Kwarde - 24.04.2011
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).
Re: Object mover - All in once -
gamer931215 - 24.04.2011
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.
Re: Object mover - All in once -
Kwarde - 24.04.2011
Anyone who's able to do it: Please remove this thread.
Re: Object mover - All in once -
gamer931215 - 24.04.2011
Quote:
Originally Posted by Kwarde
Anyone who's able to do it: Please remove this thread.
|
Why if i may ask ?
its pretty good
Re: Object mover - All in once -
Kwarde - 24.04.2011
Quote:
Originally Posted by gamer931215
Why if i may ask ?
its pretty good
|
But like you and Hiddos've said, yours is better.
Re: Object mover - All in once -
gamer931215 - 24.04.2011
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
Re: Object mover - All in once -
Kwarde - 24.04.2011
Yes, I was just thinking of an integration thing.
Your script and mine in one. Yes or No. However I'll place mine back...