cm31 Posted February 23, 2011 Posted February 23, 2011 Hey I'm trying to get it so that way when a user uses a Donater pack that will get stats money crystals level and an item but I can get the item to work Help me thanks MyDp.php <?php include "globals.php"; $_GET[iD] = abs((int) $_GET[iD]); if(!$_GET[iD]) { echo '<h2>Oops</h2>Invalid use of file'; } else { $i=$db->query("SELECT iv.*,i.*,it.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.inv_id={$_GET[iD]} AND iv.inv_userid=$userid"); } if(!$db->num_rows($i)) { print "<h2>Oops</h2>Invalid item ID"; } else { $r=$db->fetch_row($i); if($r[itmid] == 32) { $db->query("UPDATE users SET donatordays=donatordays+365 WHERE userid=$userid"); $db->query("INSERT INTO inventory VALUES('',$itemid,$userid,1)); $db->query("UPDATE users SET money=money+1500000000 WHERE userid=$userid"); $db->query("UPDATE users SET crystals=crystals+75000 WHERE userid=$userid"); $db->query("UPDATE userstats SET IQ=IQ+1000000 WHERE userid=$userid"); echo '<h2>Donator Pack</h2>You have used your donator pack!'; } item_remove($userid, $r['inv_itemid'], 1); } $h->endpage(); ?> Quote
rulerofzu Posted February 23, 2011 Posted February 23, 2011 Use the search function this has been covered more than once. Quote
cm31 Posted February 23, 2011 Author Posted February 23, 2011 I have an have found nothing on it that explains how to do it -.- Quote
rulerofzu Posted February 23, 2011 Posted February 23, 2011 http://makewebgames.io/index.php?form=Search&searchID=133858&highlight=donator Quote
cm31 Posted February 23, 2011 Author Posted February 23, 2011 Stop trolling me man I have tried that -.- Quote
rulerofzu Posted February 23, 2011 Posted February 23, 2011 Ah right so you cannot be bothered to read and wish someone to do the work for you. Prepared to pay for it then? Quote
cm31 Posted February 23, 2011 Author Posted February 23, 2011 Thats for making a DP into an item i want to put an item into a DP Quote
Dominion Posted February 23, 2011 Posted February 23, 2011 Thats for making a DP into an item i want to put an item into a DP Same principle. If the packs are there, adding money etc for the one using it, you can simply use the item_add() function that mcc already has to also give an item. Quote
cm31 Posted February 24, 2011 Author Posted February 24, 2011 I have tryed that and it breaks the page Quote
rulerofzu Posted February 24, 2011 Posted February 24, 2011 item_add function works fine. If its breaking your page then its how your using it. Quote
Djkanna Posted February 26, 2011 Posted February 26, 2011 Stop trolling me man I have tried that -.- I fail to see the 'trolling'... Perhaps take a look at Dave Mac's Donation mod, I'm pretty sure it allows you to do, what your looking for. [MCCodes V2.x] Donation System [$20] 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.