Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Livemap Größe
- $Xmax = 1024;
- $Ymax = 1024;
- // Konstante
- $X1 = -2140;
- $Y1 = 2010;
- $X2 = 1428;
- $Y2 = -1038;
- $password = "coolesau";
- if ($_GET['blip'] == 1)
- if ($_GET['password'] != $password) exit;
- if ($_GET['clear'] == 1)
- $im = imagecreatefromjpeg('map_blank.jpg');
- else
- $im = imagecreatefromjpeg('map_spieler3.jpg');
- imagealphablending($im, true);
- for ($i = 0; $i < count($_GET['Px']); $i++)
- {
- $X = (float) $_GET['Px'][$i];
- $Y = (float) $_GET['Py'][$i];
- $id = (int) $_GET['blip'][$i];
- $Xcoord = $Xmax * ($X - $X1) / ($X2 - $X1);
- $Ycoord = $Ymax * ($Y - $Y1) / ($Y2 - $Y1);
- $blip = imagecreatefrompng('blips/'.$id.'.png');
- $size = getimagesize('blips/'.$id.'.png');
- imagecopy($im, $blip, $Xcoord - $size[0]/2, $Ycoord - $size[1]/2, 0, 0, $size[0], $size[1]);
- }
- imagejpeg($im, "map_spieler3.jpg", 100);
- imagedestroy($im);
- if ($_GET['blip'] == 2)
- {
- if ($_GET['password'] != $password) exit;
- if ($_GET['clear'] == 1)
- $im = imagecreatefromjpeg('map_blank.jpg');
- else
- $im = imagecreatefromjpeg('map_fahrzeuge.jpg');
- imagealphablending($im, true);
- for ($i = 0; $i < count($_GET['Cx']); $i++)
- {
- $X = (float) $_GET['Cx'][$i];
- $Y = (float) $_GET['Cy'][$i];
- $id = (int) $_GET['blip'][$i];
- $Xcoord = $Xmax * ($X - $X1) / ($X2 - $X1);
- $Ycoord = $Ymax * ($Y - $Y1) / ($Y2 - $Y1);
- $blip = imagecreatefrompng('blips/'.$id.'.png');
- $size = getimagesize('blips/'.$id.'.png');
- imagecopy($im, $blip, $Xcoord - $size[0]/2, $Ycoord - $size[1]/2, 0, 0, $size[0], $size[1]);
- }
- imagejpeg($im, "map_fahrzeuge.jpg", 100);
- imagedestroy($im);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment