SMF Shop
SMFShop => Coding => Topic started by: redm on November 21, 2006, 04:56:37 am
-
Has anyone made any changes to allow some items to be useable but don't delete themselves when deleted? If so, please share the setting and/or code changes you made.
Thanks
-
I usually just put a call to die(); at the end of the onUse() function. This prevents the rest of the shop code from running, and it lets the item stay in your inventory. Sure, it's not pretty, but it works :P
Indeed, this was another thing I was going to do, but never actually did it. It's actually quite easy to code something like this into SMFShop, but I haven't had time to.
-
Basically, I just removed the code that deletes the items from the actual shop file, and then inserted it into the code of any item that I actually wanted to delete. Not pretty, but prettier than Daniel's method. =P