Kodzik:
<?php include '../inc/mysql.php'; $nick = $_GET['nick']; $uuid = getUUID($nick); $dname = getPlayer($uuid); $text['player'] = (haveGuild($uuid)) ? getGuild($uuid)." ".$dname : $dname; $text['kills'] = "Zabicia Ť".$r['kills']."ť"; $text['deaths'] = "Zgony Ť".$r['deaths']."ť"; $text['elo'] = $r['hcrank']." ELO"; $image = imagecreatefrompng("background.png"); $avatar = imagecreatefrompng("https://minotar.net/helm/".$dname."/64.png"); $font = "font.ttf"; $color = ImageColorAllocate($image, 255, 255, 255); imagettftext($image, 14, 0, 79, 31, $color, $font, $text['player']); imagettftext($image, 11, 0, 79, 50, $color, $font, $text['kills']); imagettftext($image, 11, 0, 283 , 50, $color, $font, $text['deaths']); imagettftext($image, 14, 0, 353 , 31, $color, $font, $text['elo']); imagecopy($image, $avatar, 6, 16, 0, 0, imagesx($avatar), imagesy($avatar)); $kills = mysql_query("SELECT * FROM `hardcore` WHERE `desc`='".$dname."' ORDER BY `ban_end_time` DESC LIMIT 5"); $a = 79; $kill = getPlayer($r['player']); $head = imagecreatefrompng("https://minotar.net/helm/".$kill."/24.png"); imagecopy($image, $head, $a, 56, 0, 0, imagesx($head), imagesy($head)); $a += 34; } } $deaths = mysql_query("SELECT * FROM `hardcore` WHERE `player`='".$uuid."' ORDER BY `ban_end_time` DESC"); $a = 283; if(translateCause($r['desc']) == "błąd") { $head = imagecreatefrompng("https://minotar.net/helm/".getRealName($r['desc'])."/24.png"); imagecopy($image, $head, $a, 56, 0, 0, imagesx($head), imagesy($head)); } else { $h = imagecreatefrompng("../static/images/causes/".$r['desc'].".png"); $head = imagecopyresized($image, $h, $a, 56, 0, 0, 24, 24, imagesx($h), imagesy($h)); } $a += 34; } } imagepng($image); imagedestroy($image); } }
Gdzie widnieje błąd? :/