Jump to content
MakeWebGames

CraigF

Members
  • Posts

    597
  • Joined

  • Last visited

    Never

Everything posted by CraigF

  1. RIGHT! Im tired of people asking how to make donation packs into items, this may not be the most convenient way but still: Make an item called Pack 1 Yes its using a different itemuse but thats because i got loads of errors when i did it in the itemuse.php file so here it is fully working!   make the file: usep1.php <?php session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); $_GET['ID'] = abs((int) $_GET['ID']); if(!$_GET['ID']) { print "Invalid use of file"; } else { $i=mysql_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",$c); } if(mysql_num_rows($i) == 0) { print "Invalid item ID"; } else { $r=mysql_fetch_array($i); if($r['itmname'] == 'Pack 1') { mysql_query("DELETE FROM inventory WHERE inv_id={$_GET['ID']}",$c); mysql_query("UPDATE users SET money=money+[b]MONEY[/b] WHERE userid=$userid",$c); mysql_query("UPDATE users SET donatordays=donatordays+[b]DDAYS[/b] WHERE userid=$userid",$c); mysql_query("UPDATE users SET crystals=crystals+[b]CRYSTALS[/b] WHERE userid=$userid",$c); mysql_query("UPDATE userstats SET IQ=IQ+[b]IQ[/b] WHERE userid=$userid",$c); print "You have used the pack, thanks for helping the game!"; } } $h->endpage(); ?> (MAKE SURE YOU CHANGE DDAYS TO THE AMOUNT, CRYSTALS TO THE AMOUNT, MONEY TO THE AMOUNT, IQ TO THE AMOUNT.   and then in inventory, add: if($i['itmname'] == 'Pack 1') { print " [[url='usep1.php?ID={$i[']Use[/url]]"; }   Now you are done :) hope it helped If you want to make another pack just do the same but change what it gives you and the file name and item name!
  2. Re: [mccode] Date Mod   you have to buy it from oxidati0n
  3. Re: [TGM] Ammunition For Weapons [TGM]   People had come to me and said that they would like a newer one as they didn't like the old one. I would not normally make a mod that had already been done unless it was VERY poorly coded. I don't even know what yours looks like, I wasn't going to create it since you already had one but I kept getting people asking for it, so I saw it best just to make it. Nothing against your version, I really have no idea what it is like, and for all I know could be 10x better than this one. i know, yours is vbetter man
  4. Re: [TGM] Ammunition For Weapons [TGM]   That was the one DeathStar and Me were selling
  5. Re: How To Do V1 Crons ( Hope This Will Help ) yeah xD
  6. Re: How To Do V1 Crons ( Hope This Will Help ) mine are working :)
  7. Re: USER ID ???? the way this could of happened is you could of edited someones ID to make it 99 and then put it back or something and now it does it from there
  8. CraigF

    WTF

    Re: WTF   i will do this when i get home
  9. CraigF

    WTF

    Re: WTF its a v1 database! also, how do i fix it if its just userstats? i get the same error if someone registeres of if i make the accont with admin panel
  10. CraigF

    WTF

    Re: WTF crediting them money works
  11. CraigF

    WTF

    Re: WTF   how do i find that out?   you click "start new topic" at the top of the thread, (not this one, the DBS Support thread)
  12. Re: free mods im not great, im ok, but hey, im self tought, like most great coders
  13. CraigF

    WTF

    Re: WTF userlist shows it working fine, just viewuser is effected
  14. CraigF

    WTF

    Re: WTF   ive tried that.   by that you mean?
  15. CraigF

    WTF

    Re: WTF thats my viewuser.php it cant be register as when i create a new person with my admin panel it doesnt work
  16. CraigF

    WTF

    Re: WTF nope i an see staff notes
  17. Re: free mods and +1 right back at you! btw dont look at my - rep, some fag did it
  18. CraigF

    WTF

    Re: WTF v1, i think it must be the database as its the same if i create a ser in admin panel
  19. Re: free mods thats quiet alright
  20. CraigF

    WTF

    Re: WTF bump, (solar is posting loads ao i am bumping so it doesnt go out of the screen)
  21. Re: free mods haha. i like you, welcome to CE. you already helping people! Try helping me if you want ;) in the WTF? thread
  22. Re: Free Advertising or make it join in with your game:   <?php /*----------------------------------------------------- -- Fallen-Lands v1.0 BETA -- A product of DBS-entertainment -- Copyright held 2005 by Dabomstew -- INDEX.php -----------------------------------------------------*/ session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); print "<center> <table width='621' border='1'> <tr> <td width='97'>Site Name </td> <td width='235'>Site Link </td> <td width='267'>Site Description</td> </tr> <tr> <td>Criminal Existence</td> <td>[url='www.criminalexistence.com/forum']HERE[/url]</td> <td>Meet experienced coders, Get help, Give Help!</td> </tr> <tr> <td>NAME</td> <td>LINK</td> <td>DESCRIPTION</td> </tr> </table> </center>"; ?>   and just add: <tr> <td>NAME</td> <td>LINK</td> <td>DESCRIPTION</td> </tr> everytime you want to add another
  23. Re: free mods im p retty sure all of these are here
  24. CraigF

    WTF

    Re: WTF it happens when i create one though
  25. CraigF

    WTF

    Re: WTF its a new game there is bound to be errors lol. do you know how to solve this? it happened before and i reset the game and it worked but i dont want to do that as i have 2 donaters and aload of members and i have reset twice so dont want to disturb them
×
×
  • Create New...