Classic multiplayer game
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

45 lines
992 B

<?php
require 'db.php';
require 'functions.php';
require 'functions_gd.php';
if ($_GET['id'] > 0) {
$user = userInfo($_GET['id']);
if ($user) {
$im = imagecreatefrompng('img/zoop_' . $user['zoop_color'] . '.png');
imageAlphaBlending($im, true);
imageSaveAlpha($im, true);
$items = getUserItems($user, true);
if (count($items) > 0) {
foreach ($items as $item_info) {
$item = getItem($item_info['itemid']);
if ($item['type'] == 'appearance') {
if ($item['renderimage'] != '') {
$im_item = imagecreatefrompng('img/items/' . $item['renderimage'] . '.png');
imageAlphaBlending($im_item, true);
imageSaveAlpha($im_item, true);
imagecopy($im, $im_item, 0, 0, 0, 0, 150, 150);
}
}
}
}
if (isset($_GET['flip'])) {
$im = flipImage($im, false, true);
}
header('Content-Type: image/png');
imagepng($im);
}
}
// Render areas
// 0 - Misc
// 1 - Face
// 2 - Head
// 3 - Left of zoop
// 4 - Right of zoop