DeaTH_RideR Posted December 21, 2009 Posted December 21, 2009 first i would like to say this is my first mod and i had a little help from my good friend Zero Affect. Ok i wanted to have something that would keep players from using a bunch of items that give like full energy over and over so here is what i done. first add these to your users table .phpmyadmin You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. then open header.php look for You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. right under that add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. then just a few lines down should be You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. right under then still in header find You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. right under that add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. save and close header. next open up itemuse.php and look for You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. right under that add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. "note you will have to find out the item type id for the items you want to use this for. save and close the file" then open up your cron_hour and put You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. save and close cron_hour. your done , if something dont work check your edits or post here. Quote
Jordan Palmer Posted December 21, 2009 Posted December 21, 2009 Happy too see some editions. Not just the basic way I see :) Well done mate Quote
(((TOLK))) Posted December 25, 2009 Posted December 25, 2009 This is cool, simple (but original) and a great addition, well done :) Quote
Zero-Affect Posted December 29, 2009 Posted December 29, 2009 wow death good job mate, well done :D won't need to hire me soon i guess ;( Quote
JAMESOMIGHTY Posted January 1, 2010 Posted January 1, 2010 nice mod, fits my game perfectly :thumbsup: Quote
jds137 Posted January 1, 2010 Posted January 1, 2010 if($r['itmtypeid'] == 3) { if($ir['hunger'] > 20){ die("You are already full, are you trying to have a heart attack?");} $db->query("UPDATE users SET hunger=hunger+25 WHERE userid='" . mysql_real_escape_string($userid) . "' AND hunger < maxhunger", $c); $db->query("UPDATE users SET energy=energy+100 WHERE userid='" . mysql_real_escape_string($userid) . "' AND energy < maxenergy", $c); $db->query("UPDATE inventory SET inv_qty=inv_qty-1 WHERE inv_id={$_GET['ID']}",$c); $db->query("DELETE FROM inventory WHERE inv_qty=0",$c); echo "<table class='mailbox' width=555'><td align='center'><font color='orange'>You are starving, you wolf down the food and feel a little better.</font> "; event_add($ir['userid'],"You used the ".$r['itmname']." but remember it only lets you eat so much.",$c); } Quote
DeaTH_RideR Posted January 13, 2010 Author Posted January 13, 2010 thanks for the kind words guys means a lot :thumbup: Quote
sixsens Posted September 28, 2012 Posted September 28, 2012 Great mod.. Thanks for this free mod. cool! +1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.