[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


Messages In This Thread
Object mover - All in once - by Kwarde - 21.04.2011, 16:09
Re: Object mover - All in once - by Hal - 21.04.2011, 19:46
Re: Object mover - All in once - by Memoryz - 21.04.2011, 21:26
Re: Object mover - All in once - by Hal - 21.04.2011, 21:31
Re: Object mover - All in once - by Kwarde - 22.04.2011, 09:03
Re: Object mover - All in once - by Hiddos - 22.04.2011, 09:04
Re: Object mover - All in once - by wheelman_WM - 22.04.2011, 09:08
Re: Object mover - All in once - by Kwarde - 22.04.2011, 10:20
Re: Object mover - All in once - by Kwarde - 24.04.2011, 06:21
Re: Object mover - All in once - by royal_king - 24.04.2011, 07:01
Re: Object mover - All in once - by Kwarde - 24.04.2011, 10:23
Re: Object mover - All in once - by gamer931215 - 24.04.2011, 11:58
Re: Object mover - All in once - by Stigg - 24.04.2011, 12:05
Re: Object mover - All in once - by Kwarde - 24.04.2011, 12:26
Re: Object mover - All in once - by gamer931215 - 24.04.2011, 13:53
Re: Object mover - All in once - by Kwarde - 24.04.2011, 16:39
Re: Object mover - All in once - by gamer931215 - 24.04.2011, 16:45
Re: Object mover - All in once - by Kwarde - 24.04.2011, 18:17
Re: Object mover - All in once - by gamer931215 - 24.04.2011, 18:25
Re: Object mover - All in once - by Kwarde - 24.04.2011, 18:32
Re: Object mover - All in once - by Kwarde - 25.04.2011, 14:27
Re: Object mover - All in once - by Basicz - 29.05.2011, 13:07
Re: Object mover - All in once - by Kwarde - 29.05.2011, 14:41
Re: Object mover - All in once - by falenone1 - 29.05.2011, 15:29
Re: Object mover - All in once - by Kwarde - 29.05.2011, 15:41
Re: Object mover - All in once - by Swiftz - 29.05.2011, 15:53
Re: Object mover - All in once - by Kwarde - 29.05.2011, 15:55
Re: Object mover - All in once - by falenone1 - 29.05.2011, 15:59
Re: Object mover - All in once - by Kwarde - 29.05.2011, 16:03
Re: Object mover - All in once - by falenone1 - 29.05.2011, 16:39
Re: Object mover - All in once - by Kwarde - 29.05.2011, 17:31

Forum Jump:


Users browsing this thread: 1 Guest(s)