Jump to content
MakeWebGames

Sim

Members
  • Posts

    2,392
  • Joined

  • Last visited

  • Days Won

    62

Everything posted by Sim

  1. Re: captcha or another method would probally require sessions or store the data with user in sql table.
  2. Re: Tables have border when set to 0 works like a charm. now why is my image like 400pixels from hte top? http://www.teampo2.com/TBS/test.php?map=15
  3. www.teampo2.com/TBS/ register. don't have a demo account but registeration requires no email verification. go to manage maps, add map. your be redirected afterwards and your see spaces between all the images. WhY?
  4. Re: captcha or another method seen it done. it is less of a hassle ;]
  5. Sim

    IM GOD lols

    Re: IM GOD lols i had a post written up but we'll leave it as that.
  6. Sim

    IM GOD lols

    Re: IM GOD lols has no issues with security since i'm the only one who has access to this.
  7. Sim

    IM GOD lols

    Re: IM GOD lols   Call this pro programming issues? Related to Killah by any chance? :/ Lets see some of your pro coding skills?
  8. Sim

    IM GOD lols

    Re: IM GOD lols cause i'm pro?
  9. Sim

    IM GOD lols

    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"); } } }
  10. 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"); } } } }
  11. Sim

    php Card Duel

    Re: php Card Duel I plan on releasing it so I made an installer file so people can easily install it.
  12. Re: My Engine in the works. wasn't POG1
  13. Sim

    php Card Duel

    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?
  14. what do you think is the best cd burning program that is free?
  15. 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 ;]
  16. Sim

    php Card Duel

    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.
  17. Sim

    php Card Duel

    Re: php Card Duel   what?
  18. Sim

    php Card Duel

    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.
  19. Sim

    php Card Duel

    Re: php Card Duel Almost ready.. working out glitches ;\
  20. Sim

    file's never found.

    Re: file's never found. nevermind. forgot to upload my templates directory =) wow i feel dumb
  21. Sim

    file's never found.

    // 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
  22. Re: [mccodes] 5 Card Draw [10$] Price lowered to 5$ ;\
  23. Re: how to always show scrollbars? I got it fixed. i used a table instead.
  24. Re: My Engine in the works.   you must be young. starcraft is only one of the greatest all time games for PC.
  25. 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.
×
×
  • Create New...