-
Posts
2,392 -
Joined
-
Last visited
-
Days Won
62
Content Type
Profiles
Forums
Events
Everything posted by Sim
-
Re: IM GOD lols has no issues with security since i'm the only one who has access to this.
-
Re: IM GOD lols Call this pro programming issues? Related to Killah by any chance? :/ Lets see some of your pro coding skills?
-
lets see who can explain what this does ;] if(isset($_POST['Submit'])) { $names = $_POST['textName']; $width = $_POST['textWidth']; $height = $_POST['textHeight']; $players = $_POST['textPlayers']; $result = mysql_query("SELECT id FROM maps WHERE name='$names'") or die(mysql_error()); if(mysql_num_rows($result) == 0) { mkdir("../images/tiles/$names", 0777); $file_typ = array(); $file_typ = explode('.',strtolower($_FILES["file"]["name"])); $file_type = $file_typ[count($file_typ)-1]; if($file_type == "png") { move_uploaded_file($_FILES["file"]["tmp_name"], "../images/tiles/$names/preview.png"); $src = imagecreatefrompng("../images/tiles/$names/preview.png"); $w = imagesx($src) / 32; $h = imagesy($src) / 32; if( (is_int($w)) && (is_int($h)) ) { mysql_query("INSERT INTO maps (name, width, height, players) VALUES ('$names','$width','$height','$players')") or die(mysql_error()); $result = mysql_query("SELECT id FROM maps WHERE name='$names'") or die(mysql_error()); $map = mysql_fetch_object($result); for($x=0; $x < $h; $x++) { for($y=0; $y < $w; $y++) { $im = imagecreate(32, 32); imagecopy($im, $src, 0, 0, $x*32,$y*32, 32, 32); imagepng($im ,"../images/tiles/$names/$x-$y.png"); imagedestroy($im); $tilefile = file_get_contents("../images/tiles/$names/$x-$y.png"); $found = false; if ($dh = opendir("../images/tiles/$names")) { while (($Tfile = readdir($dh)) !== false) { if(($Tfile != ".") && ($Tfile != "..")) { $tempfile = file_get_contents("../images/tiles/$names/$Tfile"); if($filefile == $tempfile) { unlink("../images/tiles/$names/$x-$y.png"); mysql_query("INSERT INTO mapdata (map_id, tile, x, y) VALUES ('$map->id', '$names/$Tfile','$x','$y')") or die(mysql_error()); $found = true; break; } } } closedir($dh); if($found == false) { mysql_query("INSERT INTO mapdata (map_id, tile, x, y) VALUES ('$map->id', '$names/$x-$y.png','$x','$y')") or die(mysql_error()); } } } } } header("Location: mapedit.php?map=$map->id"); } } }
-
I'm trying to take an image and extract every 32x32 image from it. heres what I got. every image i upload is divisible by 32 so I know thats not the problem. ever image I uploaded gets created as preview.png so i know thats not the problem either. mkdir("../tiles/$names", 0777); $file_typ = array(); $file_typ = explode('.',strtolower($_FILES["file"]["name"])); $file_type = $file_typ[count($file_typ)-1]; if($file_type == "png") { move_uploaded_file($_FILES["file"]["tmp_name"], "../tiles/$names/preview.png"); $src = imagecreatefrompng("../tiles/$names/preview.png"); $w = imagesx($src) / 32; $h = imagesy($src) / 32; if( (is_int($w)) && (is_int($h)) ) { /* Create a blank image */ for($x=0; $x < $h - 32; $x=$x+32) { for($y=0; $y < $w - 32; $y=$y+32) { $im = imagecreate(32, 32); imagecopymerge($im $src, 0, 0, $x,$y, $x+32, $y + 32, 0); imagepng($im ,"../tiles/$names/$x-$y.png"); } } } }
-
Re: php Card Duel I plan on releasing it so I made an installer file so people can easily install it.
-
Re: My Engine in the works. wasn't POG1
-
Re: php Card Duel Of course, technically, they will have written that script, and will most likely be providing those LIFETIME updates ;) what? who written what?
-
what do you think is the best cd burning program that is free?
-
Re: My Engine in the works. I made admin no longer viewable as I have to work on stuff and I can't have people disturbing my work ;]
-
Re: php Card Duel to whomever who can make me a login/register/index/in-game design will get a free copy of this script with LIFETIME updates.
-
Re: php Card Duel game is up and ready to be tested. please post any errors. the first game of its KIND!!!!!!!!! www.teampo2.com/cardduel/ LAYOUT IS HORRIBLE but what you want me to do about? I'm not here for looks. Instructions: upon registering. you start out with 5,000$ to purchase cards. you must first create a deck. purchase cards. then go to your card inventory and add cards to your deck. after doing that. you can send challenges to people. i recommend 20-30 cards per deck.
-
Re: php Card Duel Almost ready.. working out glitches ;\
-
Re: file's never found. nevermind. forgot to upload my templates directory =) wow i feel dumb
-
// Check if it's an absolute or relative path. if (substr($filename, 0, 1) != '/') { $filename = ($rp_filename = $this->root . '/' . $filename) ? $rp_filename : $filename; $filename = dirname(__FILE__) . '/' . str_replace("./", "", $filename); } if (!file_exists($filename)) { die("Template->make_filename(): Error - file $filename does not exist"); } file is on my server. no matter what i try keeps DYING
-
Re: [mccodes] 5 Card Draw [10$] Price lowered to 5$ ;\
-
Re: how to always show scrollbars? I got it fixed. i used a table instead.
-
Re: My Engine in the works. you must be young. starcraft is only one of the greatest all time games for PC.
-
Re: My Engine in the works. Its gonna be a tactical turn based strategy game. Think Starcraft but not REAL TIME. It will also contain single player campaign's.
-
Re: how to always show scrollbars? not working: look: www.teampo2.com/TBS/admin User: admin25 Pass: pass25 go to manage maps and click MyMap
-
Re: how to always show scrollbars? I have a map engine i'm working on and the width of 32x32 images never stay on one line. they always go to next line whne they reach the end of the browser. so i need meh SCROLLBAR.
-
www.teampo2.com/TBS/admin User: admin25 Pass: pass25 Right now all you can do is create and edit maps
-
i want to always show scroll bars. how?
-
Re: [mccodes] 5 Card Draw [10$] thats 5 card stud ;] Not even close... http://en.wikipedia.org/wiki/Five-card_draw http://en.wikipedia.org/wiki/Five_card_stud My game is 5 card something. can't remember the actual name. 5 card something.