Will Posted February 5, 2008 Posted February 5, 2008 The quantifying mod is pointless. All you have to do which will save resources. Basically every time an item is given to someone it checks to see if the item is already there and just adds more: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. This can be modded for anything from the shops to the item send page. Quote
Isomerizer Posted February 5, 2008 Posted February 5, 2008 Re: Better than Quantifying Ive wanted to add the quantifying of items to my v1 game for ages now.. I kind of realised code like this would be needed, as quantifying manually through scripts can mess the items up a lot. Has anyone got a full list of all the scripts that need to have this code added so that items are quantified up correctly? Oh and thanks will for this code, i'll be sure to add it to the item related scripts. Scripts: - itemsend.php - itembuy.php - itemsell.php ? - itemmarket.php - auctions.php ? - ganggive.php ? (Must be some admin functions that need to be edited too) Quote
Will Posted February 5, 2008 Author Posted February 5, 2008 Re: Better than Quantifying That looks like all of them. If you have some kind of gang armoury It might need to be added to that; on mine I put the gang lent items separately though. Here's my section of the code for each one: Item send You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Item Buy You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. You get the gist by now :lol: Quote
Will Posted February 5, 2008 Author Posted February 5, 2008 Re: Better than Quantifying Oh, forgot to say. The insert and search queries are different than normal because I've changed the system slightly on my game. You'll have to change it. Quote
Isomerizer Posted February 5, 2008 Posted February 5, 2008 Re: Better than Quantifying Have to remove inv_lent on the search query, and the 3 extra 0 on the INSERT. Seems simple enough, i'm going to try add this to all the main item scripts soon. Quote
HITMAN 17 Posted February 6, 2008 Posted February 6, 2008 Re: Better than Quantifying do u have v2 version Quote
Isomerizer Posted February 6, 2008 Posted February 6, 2008 Re: Better than Quantifying do u have v2 version v2 comes with this... gah.. Quote
parelem Posted February 6, 2008 Posted February 6, 2008 Re: Better than Quantifying v2 comes with this... gah.. comes with, does not always mean is implemented in. Quote
ignite Posted February 6, 2008 Posted February 6, 2008 Re: Better than Quantifying Would you need to edit your inventory.php in order for this to work ? Quote
HITMAN 17 Posted February 6, 2008 Posted February 6, 2008 Re: Better than Quantifying as i will probly mess it up has some one got an inverntory v2 with it that they can post Quote
HITMAN 17 Posted February 6, 2008 Posted February 6, 2008 Re: Better than Quantifying Would you need to edit your inventory.php in order for this to work ? u dont mate soz i wasnt thinking clearly lmao Quote
Isomerizer Posted February 6, 2008 Posted February 6, 2008 Re: Better than Quantifying Would you need to edit your inventory.php in order for this to work ? yes u will mate Erm... No you will not. Quote
HITMAN 17 Posted February 6, 2008 Posted February 6, 2008 Re: Better than Quantifying do u have a v2 copy anyone that i can use to quantify automaticly Quote
Isomerizer Posted February 6, 2008 Posted February 6, 2008 Re: Better than Quantifying do u have a v2 copy anyone that i can use to quantify automaticly A v2 quantify script has been made before on CE. Try using the search feature. http://criminalexistence.com/ceforums/i ... ion=search Quote
HITMAN 17 Posted February 6, 2008 Posted February 6, 2008 Re: Better than Quantifying ok cheers Quote
ignite Posted February 7, 2008 Posted February 7, 2008 Re: Better than Quantifying $rfr=mysql_query("SELECT inv_id,inv_itemid FROM inventory WHERE inv_itemid=4 AND inv_userid=$userid ",$c) or die(mysql_error()); $y=mysql_fetch_array($rfr); { if(mysql_num_rows($rfr) == 0) { //create seperate $qut=$_GET['qty']; mysql_query("INSERT INTO inventory VALUES('',$itemidexplo,$userid,1)",$c); mysql_query("DELETE FROM inventory WHERE inv_qty=0", $c); } if(mysql_num_rows($rfr) >=1) { $qut=$_GET['qty']; $itemid=$y['inv_id']; mysql_query("UPDATE inventory SET inv_qty=+1 WHERE inv_id=$itemidexplo",$c) or die(mysql_error()); mysql_query("DELETE FROM inventory WHERE inv_qty=0", $c); } Anyone know whats wrong with this for street.php ? Quote
Ragnar Posted February 19, 2008 Posted February 19, 2008 Re: Better than Quantifying You can do Quantifying with out having to edit a bunch of files, and the users still won't have to click any Quantifying link. They will have no idea they did this. For version 2, just rename your current inventory.php to items.php and make inventory.php... You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Every time a player clicks the Inventory link, they will go to items.php and have no idea they did the Quantify! Quote
Will Posted February 19, 2008 Author Posted February 19, 2008 Re: Better than Quantifying The point of this is that you don't have to do loads of queries and running an in-efficient script every time the user looks at their inventory. Quote
Scylla Posted March 13, 2008 Posted March 13, 2008 Re: Better than Quantifying gahhhhhh v2 might come with it but it doesnt quantify the admin sends nor the streets for most people..... 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.