CreateDynamicObject(14467, coreX, coreY, coreZ, coreRX, coreRY, coreRZ); // Core
obj = CreateDynamicObject(970, coreX+2.839970, coreY+0.300050, coreZ-2.202200, coreRX+0.000000, coreRX+0.000000, coreRX+90.000000);
<?php
$file = file_get_contents("code.txt");
$lines = explode(PHP_EOL, $file);
$coreX = 633.57617;
$coreY = -1398.31873;
$coreZ = 13.74630;
$coreRX = 0.00000;
$coreRY = 0.00000;
$coreRZ = 0.00000;
foreach ($lines as $line) {
$line = str_replace("CreateDynamicObject(", "", $line);
$line = str_replace("CreateObject(", "", $line);
$line = str_replace(");", "", $line);
$exploded = explode(",", $line);
$model = $exploded[0];
$x = $exploded[1];
$y = $exploded[2];
$z = $exploded[3];
$rx = $exploded[4];
$ry = $exploded[5];
$rz = $exploded[6];
//echo sprintf("X: %f", $x);
//echo sprintf("coreX: %f", $coreX);
//echo sprintf("coreX-x: %f", $coreX-$x);
$line = sprintf("obj = CreateDynamicObject(%d,", $model);
if($x<$coreX)
{
$line = sprintf("%s coreX-%f,", $line, $coreX-$x);
}
if($x>=$coreX)
{
$line = sprintf("%s coreX+%f,", $line, $x-$coreX);
}
if($y<$coreY)
{
$line = sprintf("%s coreY-%f,", $line, $coreY-$y);
}
if($y>=$coreY)
{
$line = sprintf("%s coreY+%f,", $line, $y-$coreY);
}
if($z<$coreZ)
{
$line = sprintf("%s coreZ-%f,", $line, $coreZ-$z);
}
if($z>=$coreZ)
{
$line = sprintf("%s coreZ+%f,", $line, $z-$coreZ);
}
if($rx<$coreRX)
{
$line = sprintf("%s coreRX-%f,", $line, $coreRX-$rx);
}
if($rx>=$coreRX)
{
$line = sprintf("%s coreRX+%f,", $line, $rx-$coreRX);
}
if($ry<$coreRY)
{
$line = sprintf("%s coreRX-%f,", $line, $coreRY-$ry);
}
if($ry>=$coreRY)
{
$line = sprintf("%s coreRX+%f,", $line, $ry-$coreRY);
}
if($rz<$coreRZ)
{
$line = sprintf("%s coreRX-%f,", $line, $coreRZ-$rz);
}
if($rz>=$coreRZ)
{
$line = sprintf("%s coreRX+%f,", $line, $rz-$coreRZ);
}
$line = rtrim($line, ',');
$line = sprintf("%s);", $line);
echo $line;
echo '<br />';
echo "Streamer_SetIntData(STREAMER_TYPE_OBJECT, obj, E_STREAMER_EXTRA_ID, roundAboutCache[id][raCoreObject]);";
echo "<br />";
}
?>
The roundabouts are made of a Core Object, and the other
objects are set corresponding to position and rotation of the core object Let me know if i fucked up something big time, i will fix it |
Yes you fucked up something big time you didn't even explain what this does at all. That is not really an explanation it does not answer the following questions.
1.) Can we see some screenshots? 2.) What do we even use this for? |