Jump to content

Fenikss

Member
  • Posts

    42
  • Joined

  • Last visited

  • Feedback

    0%

About Fenikss

Informations

  • Gender
    Male

Fenikss's Achievements

Enthusiast

Enthusiast (6/16)

  • Collaborator
  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. my script var loading = false; $(document).ready(function(){ $("div#l").click(function(){ send('left',8,0,1); }); $("div#p").click(function(){ send('right',-8,0,2); }); $("div#g").click(function(){ send('up',0,8,3); }); $("div#d").click(function(){ send('down',0,-8,0); }); $("div#oHero").click(function(){ }); $(document).keydown(function (event) { if(event.keyCode==65 && chatmode==0){send('left',8,0,1);} if(event.keyCode==87 && chatmode==0){send('up',0,8,3);} if(event.keyCode==68 && chatmode==0){send('right',-8,0,2);} if(event.keyCode==83 && chatmode==0){send('down',0,-8,0);} }); }); function send(page,ox,oy,direction){ if(loading) return false; loading = true; $.ajax({ type: "POST", url: "system/idz.php", data:"move="+page, success : function (msg){ loading = false; if (msg){ $('#oMap').css("background-image","url("+msg+")"); setTimeout("map_poz(x+="+ox+",y+="+oy+");animation(0,"+direction+");",10); setTimeout("map_poz(x+="+ox+",y+="+oy+");animation(1,"+direction+");",20); setTimeout("map_poz(x+="+ox+",y+="+oy+");animation(2,"+direction+");",30); setTimeout("map_poz(x+="+ox+",y+="+oy+");animation(3,"+direction+");",40); setTimeout("animation(0,"+direction+");",50); } } }); } function map_poz(x,y){ $("#oMap").css("background-position", x+"px "+y+"px"); } function animation(cage,direction){ $("#oHero").css("background-position",(-cage*32)+"px "+(-direction*48)+"px"); } // GOOD GAME how to slow walking and fix Turn character go upwards and wants to turn into the side of it for a moment I can not move
  2. hi dev i have problems on walking character on ground as I let the key figure continues on someone can litle help? i know i must add keyup but where $(document).ready(function(){ $("div#l").click(function(){ wyslij('lewo',8,0,1); }); $("div#p").click(function(){ wyslij('prawo',-8,0,2); }); $("div#g").click(function(){ wyslij('gora',0,8,3); }); $("div#d").click(function(){ wyslij('dol',0,-8,0); }); $("div#oHero").click(function(){ }); $(document).keydown(function (event) { if(event.keyCode==65 && chatmode==0){$("div#l").click();} if(event.keyCode==87 && chatmode==0){$("div#g").click();} if(event.keyCode==68 && chatmode==0){$("div#p").click();} if(event.keyCode==83 && chatmode==0){$("div#d").click();} }); }); function wyslij(strona,ox,oy,kierunek){ $.ajax({ type: "POST", url: "js/idz.php", data:"move="+strona, success: function(msg){ if(msg){ $('#oMap').css("background-image","url("+msg+")"); setTimeout("map_poz(x+="+ox+",y+="+oy+");animation(0,"+kierunek+");",100); setTimeout("map_poz(x+="+ox+",y+="+oy+");animation(1,"+kierunek+");",200); setTimeout("map_poz(x+="+ox+",y+="+oy+");animation(2,"+kierunek+");",300); setTimeout("map_poz(x+="+ox+",y+="+oy+");animation(3,"+kierunek+");",400); setTimeout("animation(0,"+kierunek+");",500); } } }); } function map_poz(x,y){ $("#oMap").css("background-position", x+"px "+y+"px"); } function animation(klatka,kierunek){ $("#oHero").css("background-position",(-klatka*32)+"px "+(-kierunek*48)+"px"); } // GOOD GAME
  3. i have problem here i want create login and haslo this ius code <?php require_once('game/config/config.php'); ?> <?php $db_user = @mysql_num_rows(@mysql_query("select * from user")); $code = @mysql_query("select * from user order by id asc"); if(!empty($_POST['login'])){ if(!empty($_POST['haslo'])){ if(!empty($_POST['user'])){ $db_user_dane = @mysql_fetch_array(@mysql_query("select * from user where id = '".$_POST['user']."','".$_POST['login']."' and haslo = '".$_POST['haslo']."' limit 1")); if(!empty($db_user_dane)){ $_SESSION['user'] = $_POST['user']; header('Location: game.php'); } else { echo "<span style='color: red; font-weight: bold;'>Bledny Login</span><hr>"; } } else { echo "<span style='color: red; font-weight: bold;'>Bledne Haslo</span><hr>"; } } } ?> <center> <form action='logowanie.php' method='post'> <select name="user"> <?php while($wczytuje = @mysql_fetch_array($code)){ echo "<option value='".$wczytuje['id']."'>".$wczytuje['nazwa']."(".$wczytuje['poziom'].")</option>"; } ?> </select><br> <input type='text' name='login' style='width: 100px;'><br> <input type='password' name='haslo' style='width: 100px;'><br> <input type='submit' value='Zaloguj'><br> </form> <hr> when i paste wrong password message is wrong login when i paste wrong login i have wrong login and when i paste 123 password this is password and login and not work i see message wrong login
  4. <?php $host = 'localhost'; $user = 'root'; $pass = ''; $db = 'game'; $connect = @mysql_connect($host, $user, $pass) or die('socket error'); @mysql_select_db($db, $connect) or die('socket error - no db'); @mysql_query("SET NAMES 'utf8-polish-ci'"); session_start(); $user = @mysql_fetch_array(@mysql_query("select * from user where id = '".$_SESSION['user']."' limit 1")) or die('socket error - no table'); ?> i got errors socket error - no table i have this table what is wrong?
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.