Becon Posted August 2, 2009 Posted August 2, 2009 Ok. I used a mod off here for a gang armoury and cant find the original right now but my problem is when I have a lent item from the armoury....or armory...however you like to spell it...and I use an auto item quantifyer it screws everything up. It throws the lent items in with the non lent items. Then to make matters worse if when you lend out an item to ID number whatever and start refreshing it keeps sending the items and dupes them. Now with quantify making everything mixed up Im able to sell all the duped items and make hella bank. If I take quantify off and do it I can still dupe the items into the inventory but when I recall the item lent it takes back only the one it was supposed to and Im left with the rest that I can NOT sell as inventory still thinks that it was lent from the gang so they just get a messed up inventory. Any way of quantifying items and keeping the lent ones seperate from the actual owned ones? Im using MDK666's Inventory mod http://criminalexistence.com/ceforums/index.php?topic=26757.0 And this is my lenditem.php <?php include "globals.php"; $gq=mysql_query("SELECT g.*,oc.* FROM gangs g LEFT JOIN orgcrimes oc ON g.gangCRIME=oc.ocID WHERE g.gangID={$ir['gang']}",$c); $gangdata=mysql_fetch_array($gq); $q=mysql_query("SELECT * FROM items WHERE itmid={$_GET['ID']}",$c); $item=mysql_fetch_array($q); $q=mysql_query("SELECT * FROM gangarmory WHERE armoryITEMID={$_GET['ID']} AND armoryGANGID={$ir['gang']} AND armoryID={$_GET['ITEMID']}",$c); $pres=$gangdata['gangPRESIDENT']; $vicepres=$gangdata['gangVICEPRES']; $theitem=$item['itmname']; $username=$ir['username']; if($_GET['ID'] && $_GET['USER'] && $_GET['ITEMID']) { $f=mysql_query("SELECT * FROM users WHERE userid={$_GET['USER']}",$c); $er=mysql_fetch_array($f); $otheruser=$er['userid']; if($userid != $pres && $userid != $vicepres) { die("You are not President or Vice President of your gang therefore cannot give out armory items."); } if($er['gang'] != $ir['gang']) { die("That user is not in your gang."); } if(mysql_num_rows($q)==0) { die("Your gang does not own this item."); } mysql_query("UPDATE gangarmory SET armoryLENT={$_GET['USER']} WHERE armoryID={$_GET['ITEMID']} LIMIT 1;",$c); mysql_query("INSERT INTO inventory VALUES ('','{$_GET['ID']}','{$er['userid']}','1','{$ir['gang']}');",$c); mysql_query("INSERT INTO gangevents VALUES ('',{$gangdata['gangID']},unix_timestamp(),\"{$er['username']} was lent a/an $theitem from the gang armory.\");",$c); event_add($otheruser,"You have been lent a/an $theitem from your gang's armory.",$c,'general'); die("You took the $theitem from the gang armory and lent it to {$er['username']}."); } else if($_GET['ID'] && $_GET['ITEMID']) { print "[b]Enter the ID of the member of your gang that you wish to lend the $theitem to.[/b]</br> <form action='lenditem.php' method='get'> <input type='hidden' name='ID' value='{$_GET['ID']}' />User ID: <input type='text' name='USER' value='' /><input type='hidden' name='ITEMID' value='{$_GET['ITEMID']}' /> </br> <input type='submit' value='Lend To Member' /></form>"; } $h->endpage(); ?> Anything else you need? Thanx in advance. Still a noob!! =o)~ 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.