Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if( isset($_POST['submit']) ) :
- if( $_POST['submit'] == "RAW") :
- exit(nl2br($_POST['objekt_output']));
- elseif( $_POST['submit'] == "TXT") :
- header("Pragma: public");
- header("Expires: 0");
- header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
- header("Cache-Control: private",false);
- header("Content-type: application/force-download");
- header("Content-Disposition: attachment; filename=\"objects.txt\";" );
- header("Content-Transfer-Encoding: binary");
- exit($_POST['objekt_output']);
- endif;
- endif;
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <!--
- blabla head
- -->
- </head>
- <body>
- <div class="body">
- <div class="wrapper">
- <div class="main">
- <div class="sideMenu">
- <!--
- blabla menu
- -->
- </div>
- <div class="content">
- <?php if( isset($_POST['submit']) ) : ?>
- <form action="object.php" id="form" method="POST">
- <?php
- $input = trim($_POST['objekt_input']);
- $from = $_POST['convert_from'];
- $to = $_POST['convert_to'];
- /* Split Lines */
- $rows = explode("\n", $input);
- $rows = array_filter($rows, 'trim');
- /* Form output */
- $output = '';
- /* Konvert Objekts */
- foreach($rows AS $object) {
- $methodName = 0;
- $modelid = 0;
- $pos = array(0.0,0.0,0.0);
- $rot = array(0.0,0.0,0.0);
- $dist = 300.0;
- $world = -1;
- $int = -1;
- $playerid = -1;
- $object = htmlentities($object); //make remaining items html entries.
- //$object = nl2br($object); //add html line returns
- $object = str_replace(chr(10), " ", $object); //remove carriage returns
- $object = str_replace(chr(13), " ", $object); //remove carriage returns
- /* Standard */
- switch($from) {
- case 1:
- case 2:
- case 3:
- case 6:
- case 7:
- case 8:
- case 9:
- case 10:
- case 11:
- case 12: {
- //$object = str_replace("CreateObject(", "", $object);
- //$object = str_replace(");", "", $object);
- /*
- var tmpobject_ = tmpobject.split(';');
- Objekt['C'] = tmpobject_[1];
- tmpobject = tmpobject_[0];
- tmpobject_ = tmpobject.split('(');
- tmpobject = tmpobject_[1];
- tmpobject_ = tmpobject.split(')');
- tmpobject = tmpobject_[0].split(',');
- */
- $object = explode(";", $object);
- $object = $object[0];
- $object = explode("(", $object);
- $object = $object[1];
- $object = explode(")", $object);
- $object = $object[0];
- $object = str_replace(" ", "", $object);
- $object = stripslashes($object);
- $parts = explode(",", $object);
- $modelid = $parts[0];
- $pos[0] = $parts[1];
- $pos[1] = $parts[2];
- $pos[2] = $parts[3];
- $rot[0] = $parts[4];
- $rot[1] = $parts[5];
- $rot[2] = $parts[6];
- if(count($parts) > 7) :
- $dist = $parts[7];
- endif;
- break;
- }
- case 5: {
- $object = explode(";", $object);
- $object = $object[0];
- $object = explode("(", $object);
- $object = $object[1];
- $object = explode(")", $object);
- $object = $object[0];
- $object = str_replace(" ", "", $object);
- $object = stripslashes($object);
- $parts = explode(",", $object);
- $modelid = $parts[0];
- $pos[0] = $parts[1];
- $pos[1] = $parts[2];
- $pos[2] = $parts[3];
- $rot[0] = $parts[4];
- $rot[1] = $parts[5];
- $rot[2] = $parts[6];
- if(count($parts) > 10) :
- $dist = $parts[10];
- endif;
- break;
- }
- case 4: {
- break;
- }
- }
- ////////////////////////////////////////////////////////
- /* Standard */
- if($to == 1) :
- $output .= "CreateObject(".$modelid.", ".$pos[0].", ".$pos[1].", ".$pos[2].", ".$rot[0].", ".$rot[1].", ".$rot[2].", ".$dist.");\n";
- /* Double-O-Objects */
- elseif($to == 2) :
- $output .= "CreateStreamObject(".$modelid.", ".$pos[0].", ".$pos[1].", ".$pos[2].", ".$rot[0].", ".$rot[1].", ".$rot[2].", ".$dist.", ".$world.");\n";
- /* Einstein's Object Streamer */
- elseif($to == 3) :
- $output .= "CreateObjectToStream(".$modelid.", ".$pos[0].", ".$pos[1].", ".$pos[2].", ".$rot[0].", ".$rot[1].", ".$rot[2].");\n";
- /* Fallout's Object Streamer */
- elseif($to == 4) :
- $output .= "F_CreateObject(".$modelid.", ".$pos[0].", ".$pos[1].", ".$pos[2].", ".$rot[0].", ".$rot[1].", ".$rot[2].", ".$dist.", false);\n";
- /* Incognito's Streamer Plugin */
- elseif($to == 5) :
- $output .= "CreateDynamicObject(".$modelid.", ".$pos[0].", ".$pos[1].", ".$pos[2].", ".$rot[0].", ".$rot[1].", ".$rot[2].", ".$world.", ".$int.", ".$playerid.", ".$dist.");\n";
- /* MidoStream Object Streamer */
- elseif($to == 6) :
- $output .= "CreateStreamObject(".$modelid.", ".$pos[0].", ".$pos[1].", ".$pos[2].", ".$rot[0].", ".$rot[1].", ".$rot[2].", ".$dist.");\n";
- /* pObjectStreams */
- elseif($to == 7) :
- $output .= "CreateDynamicObject(".$modelid.", ".$pos[0].", ".$pos[1].", ".$pos[2].", ".$rot[0].", ".$rot[1].", ".$rot[2].");\n";
- /* rStreamer */
- elseif($to == 8) :
- $output .= "CreateStreamedObject(".$modelid.", ".$pos[0].", ".$pos[1].", ".$pos[2].", ".$rot[0].", ".$rot[1].", ".$rot[2].", ".$dist.");\n";
- /* tAxI's Streamer Systems */
- elseif($to == 9) :
- $output .= "CreateStreamObject(".$modelid.", ".$pos[0].", ".$pos[1].", ".$pos[2].", ".$rot[0].", ".$rot[1].", ".$rot[2].", ".$dist.");\n";
- /* YSI CreateDynamicObject */
- elseif($to == 10) :
- $output .= "CreateDynamicObject(".$modelid.", ".$pos[0].", ".$pos[1].", ".$pos[2].", ".$rot[0].", ".$rot[1].", ".$rot[2].");\n";
- /* xObjects v1 */
- elseif($to == 11) :
- $output .= "{".$modelid.", ".$pos[0].", ".$pos[1].", ".$pos[2].", ".$rot[0].", ".$rot[1].", ".$rot[2].", ".$dist."};\n";
- /* xStreamer */
- elseif($to == 12) :
- $output .= "CreateStreamedObject(".$modelid.", ".$pos[0].", ".$pos[1].", ".$pos[2].", ".$rot[0].", ".$rot[1].", ".$rot[2].");\n";
- endif;
- }
- /* Count Lines */
- $count = count(explode(";", $output))-1;
- $__t = "";
- if($count == 0) :
- echo '<h1>Es wurden keine Objekte Konvertiert :(</h1>';
- elseif($count == 1) :
- echo '<h1>Es wurde ein Objekt Konvertiert :)</h1>
- <span style="position:absolute; margin-top: -31px;margin-left: 694px;" >
- <div class="buttons">
- <button type="submit" class="button left" name="submit" value="RAW" />RAW</button><button type="submit" class="button right" name="submit" value="TXT" />DOWNLOAD</button>
- </div>
- </span>';
- else :
- echo '<h1>Es wurden '.$count.' Objekte Konvertiert :D</h1>
- <span style="position:absolute; margin-top: -31px;margin-left: 694px;" >
- <div class="buttons">
- <button type="submit" class="button left" name="submit" value="RAW" />RAW</button><button type="submit" class="button right" name="submit" value="TXT" />DOWNLOAD</button>
- </div>
- </span>';
- endif;
- ?>
- <hr>
- <textarea name="objekt_output" cols="40" rows="5" style="width: 823px !important;min-height: 100px;height: <?=($count*19)?>px;"><?=$output?></textarea>
- </form>
- <?php else : ?>
- <h1>Objekte Konvertieren</h1>
- <hr>
- <form action="object.php" id="form" method="POST">
- <input type="hidden" name="submit" value="submit">
- <textarea name="objekt_input" wrap="physical" id="objekt_input" cols="40" rows="5" style="width: 823px !important;height: 95px;" placeholder="Die Objekte die du Konvertieren möchtest hier einfügen..."></textarea>
- <br /><br />
- Konvertieren von:
- <select name="convert_from">
- <option value="1" selected>Standard</option>
- <option value="2">Double-O-Objects</option>
- <option value="3">Einstein's Object Streamer</option>
- <option value="4">Fallout's Object Streamer</option>
- <option value="5">Incognito's Streamer Plugin</option>
- <option value="6">MidoStream Object Streamer</option>
- <option value="7">pObjectStreams</option>
- <option value="8">rStreamer</option>
- <option value="9">tAxI's Streamer Systems</option>
- <option value="10">YSI CreateDynamicObject</option>
- <option value="11">xObjects v1</option>
- <option value="12">xStreamer</option>
- </select>
- Zu:
- <select name="convert_to">
- <option value="1">Standard</option>
- <option value="2">Double-O-Objects</option>
- <option value="3">Einstein's Object Streamer</option>
- <option value="4">Fallout's Object Streamer</option>
- <option value="5" selected>Incognito's Streamer Plugin</option>
- <option value="6">MidoStream Object Streamer</option>
- <option value="7">pObjectStreams</option>
- <option value="8">rStreamer</option>
- <option value="9">tAxI's Streamer Systems</option>
- <option value="10">YSI CreateDynamicObject</option>
- <option value="11">xObjects v1</option>
- <option value="12">xStreamer</option>
- </select>
- <input type="submit" class="button" value="Konvertieren!" />
- </form>
- <p style="margin-top: 200px;">
- <a href="http://forum.sa-mp.de/san-andreas-multiplayer/scripting-base/showroom/7442-double-o-objects-ein-weiterer-objektestreamer/" target="_blank">Double-O-Objects</a> -
- <a href="http://forum.sa-mp.de/san-andreas-multiplayer/scripting-base/showroom/603-einstein-s-objectstreamer/" target="_blank">Einstein's Object Streamer</a> -
- <a href="http://forum.sa-mp.com/showthread.php?t=117920" target="_blank">Fallout's Object Streamer</a> -
- <a href="http://forum.sa-mp.com/showthread.php?t=102865" target="_blank">Incognito's Streamer Plugin</a> -
- <a href="http://forum.sa-mp.com/showthread.php?t=39836" target="_blank">MidoStream Object Streamer</a> -
- <a href="http://forum.sa-mp.com/showthread.php?t=60026" target="_blank">pObjectStreams</a> -
- <a href="http://forum.sa-mp.com/showthread.php?t=122909" target="_blank">rStreamer</a> -
- <a href="http://forum.sa-mp.com/showthread.php?t=35624" target="_blank">tAxI's Streamer Systems</a> -
- <a href="http://forum.sa-mp.com/showthread.php?t=61548" target="_blank">YSI CreateDynamicObject</a> -
- <a href="http://forum.sa-mp.com/showthread.php?t=33788" target="_blank">xObjects v1</a> -
- <a><s>xStreamer</s></a>
- </p>
- <?php endif; ?>
- </div>
- </div>
- </div>
- </div>
- </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement