Jump to content
MakeWebGames

peterisgb

Members
  • Posts

    727
  • Joined

  • Last visited

  • Days Won

    40

Everything posted by peterisgb

  1. i've been working on a little addon so that it shows the last page the user is on. i used this code   global $db,$ir; $db->query("UPDATE users SET lastpage='Users Online' WHERE userid=$userid");   but this means i'll have to put it on every page :( which will take forever. so with that in mind i decided to put this code below in header.php   global $db,$ir; $db->query("UPDATE users SET lastpage='".$_SERVER['PHP_SELF']."' WHERE userid=$userid");   Which works might i say but there is a little snag with it, the first code is displays like this "Users Online" but using the PHP self code it comes out like this "/game/usersonline.php". Is there a way to use the PHP SELF code but not display the whole link, but instead just the page that the user is on, Thanks for any replys or help on this.
  2. dont worry, i dont blame the creator, i blame this site and its stupid change thingy that messed all the codes
  3. ACTUALLY FORGET THIS, NO IMAGES AND ITS FULL OF BUGS LEFT RIGHT AND CENTRE sorry caps lock
  4. good mod, but has anyone got the images, or what do i need to edit to change it
  5. Anyone have an offer to make this, i dont mind paying, name the price
  6. use the code meta [ c o d e ] CODE HERE [ / c o d e ] Thanks
  7. Well if someone is offering to make it and PM me a price, if its a good price i dont mind paying, :)
  8. Works a charm, thanks sniko +1
  9. hi, I'm trying to add Weapon Power into a page but the code for some reason does not work, as i'm still learning it could be tottally wrong, heres the code   $p=$db->query("SELECT * FROM items WHERE itmid IN({$ir['weapon']})"); while($h=$db->fetch_row($p)) { $equip[$r['itmid']]=$h; } the table is items and the query is called weapon, thanks
  10. ok solved it
  11. i posted one up yay, if i had help with the other mods i'm working on i can post them here once there done.
  12. and which lines to i need to remove so it dont require a code, the config code thing stops fuctions from working :( Reason is i've made the banking in the side menu, you need the code for the page to work, but once it comes up it works, the problem is when you deposit or withdraw it uses a withdraw function, I've tried to take the config code out but it didnt work, any help would be a great help
  13. having the player info tabbed is alot better due to the fact it updates the info on the stats quicker, only problem is i dont know how to get the links in the iframe to load on the main page :s i tried target='_blank' but that dont seem to work :s
  14. oh, well that was the idea, cos i was wanting something like, go mining and get minerals like iron, copper, tin etc to be able upgrade the weapons, but i cant do this, my knowledge of php aint that good yetm i'm still learning as of yet
  15. and what would the database access for the Items be, i'm trying to put weapon,secondary weapons and armour into a seprate page but i dont know the database access. thanks
  16. on attack php, you can change the attack units, Default it /2 which is 50% i've changed mine into /5 which is 20 Energy , is there a way that it can only just use one attack though something like this would work but i'm not sure now, print "<table width=100%><tr><td colspan=2 align=center>"; if($_GET['wepid']) { if($_SESSION['attacking']==0 && $ir['attacking'] == 0) { if ($youdata['energy'] >= $youdata['maxenergy']/10000) { $db->query("UPDATE users SET energy=energy-1 WHERE userid=$userid"); $_SESSION['attacklog']=""; $_SESSION['attackdmg']=0; } else { print "You can only attack someone when you have 1 energy"; $h->endpage(); exit; this wont work i beleive, but is it possible and how would i go about doing this?
  17. thank you so much, works a charm, now i can carry on with my work, thanks illusions aswell :)
  18. http://www.w3schools.com/html/tryit.asp?filename=tryhtml_intro
  19. that sucks, well i'll have to leave it to you anyway, i've tried loads of ideas, the only one i got to work was include "globals.php" which is ovious lol.
  20. thanks lord master :)
  21. well the iframe is in header.php the iframe auto opens playerinfo.php which is the page i just posted,
  22. tho this repeats the same name etc all the way down the page :'(
  23. here you go.   <?php include "config.php"; global $db,$c,$ir,$set,$_CONFIG; if($_GET['code'] != $_CONFIG['code']) { die(""); } define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; print " <a id='button1a'><b>Player Info</b><br /></a> <a id='button1a' href='usersonline.php'><b>Name:</b> $gn{$u} [{$ir['userid']}] $d $staff <br /></a> <a id='button1a' href='gym.php'><b>Level:</b> {$ir['level']}<br /></a> <a id='button1a' href='bank.php'><b>Money:</b> {$fm}<br /></a> <a id='button1a' href='bank.php'><b>Bank Money:</b> {$ir['bankmoney']}<br /></a> <a id='button1a' href='cyberbank.php'><b>Cyber Money:</b> {$ir['cybermoney']}<br /></a> <a id='button1a' href='creditcard.php'><b>Credit Card:</b> {$ir['creditcard']}<br/></a> <a id='button1a' href='crystaltemple.php'><b>Crystals:</b> {$ir['crystals']}<br /></a> <a id='button1a' href='cigarettes.php'><b>Smoking Level:</b> {$ir['smoking']}<br /></a> <a id='button1a' href='cigarettes.php'><b>Smoker:</b> $smoke<br /></a> <a id='button1a' href='logout.php'><font color='white'>[</font><font color='red'>Emergency Logout</font><font color='white'>]</font></a> "; } ?>
  24. i tried i tried the crons login code yesterday and it didnt work :( global $db,$c,$ir, $set;
  25. yup, shame the links not here no more, wanted to have a look :(
×
×
  • Create New...