Jump to content
MakeWebGames

peterisgb

Members
  • Posts

    790
  • Joined

  • Last visited

  • Days Won

    58

Everything posted by peterisgb

  1. Hi, i'm been working on enabling the Help Tutorial to be abled to update from the staff page without going into the server. Well here is what i have so far   <?php include "sglobals.php"; switch($_GET['action']) { default: index(); break; } function index() { global $db,$h,$set; print "<h3>Help Tutorial</h3> <form action='helptut.php?action=helpupdate' method='post'> <textarea rows=30 cols=90 name='helptext' class='input'>{$set['help']}</textarea><br /> <input type='submit' value='Update Help Tutorial' /></form>"; } function helpupdate() { global $db,$h,$set; $db->query("UPDATE settings SET conf_value='{$_POST['helptext']}' WHERE conf_name='help'"); print "Help Updated!<a href='helptut.php'>Back</a>"; } $h->endpage(); ?>   The problem i am having is that it shows up the text within the box, but when you click update is doesnt update, is just goes back to the same page, the link shows its gone to the right page but thats it.   If some could help me figure out whats wrong they can use this aswell, add Fields 'Help' to the Table 'Settings'
  2. mccodes v2
  3. erm.. i already said i couldn't fix it... so trying again when i spent a whole week on it wont help, hense why i asked after a week trying if anyone has a copy of this.
  4. i'm getting this with the whole game, and i have checked the querys.
  5. i would post what i had so far, but because i couldnt do it i deleted it. hense why i asked if someone had a working copy cos i couldnt fix it
  6. erm.. i would of though so, but this doesnt work so i cant really tell you.
  7. anyone got a corrected version for this?
  8. 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.
  9. dont worry, i dont blame the creator, i blame this site and its stupid change thingy that messed all the codes
  10. ACTUALLY FORGET THIS, NO IMAGES AND ITS FULL OF BUGS LEFT RIGHT AND CENTRE sorry caps lock
  11. good mod, but has anyone got the images, or what do i need to edit to change it
  12. Anyone have an offer to make this, i dont mind paying, name the price
  13. use the code meta [ c o d e ] CODE HERE [ / c o d e ] Thanks
  14. Well if someone is offering to make it and PM me a price, if its a good price i dont mind paying, :)
  15. Works a charm, thanks sniko +1
  16. 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
  17. ok solved it
  18. 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.
  19. 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
  20. 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
  21. 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
  22. 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
  23. 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?
  24. thank you so much, works a charm, now i can carry on with my work, thanks illusions aswell :)
  25. http://www.w3schools.com/html/tryit.asp?filename=tryhtml_intro
×
×
  • Create New...