21.04.2011, 16:09
(
Последний раз редактировалось Kwarde; 25.10.2011 в 15:06.
Причина: Update
)
Hey!
I've made a nice tool, with PHP. You can move objects (offsets). Example:
Input
Settings
X: 0
Y: 5 (so that's +5)
Z: -1.5
Output
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.
Enjoy it.
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);
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);
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
}
?>