23.07.2012, 13:22
Hey guys!
I was wondering how I could make an inventory system that supports generic items.
Example: command: /giveitem <playerid> <itemID> <value>.
Now, let's say ID 44 is the "generic" item, meaning it can be anything the value says.
Performing the command is easy, simply /giveitem playerid 44 License.
Safing it wouldn't be a problem either, seeing I can just say
INI_WriteString(file, "GenericItem", value);
But here comes the question, how can I safe multiple generic items? Let's say I have given Joe bloggs a license, but now I want to give him a badge. If I do /giveitem <playerid> 44 badge now it will overwrite the license.
So how can I create an invent. system with multiple non-overwritable but deletable string?
I was wondering how I could make an inventory system that supports generic items.
Example: command: /giveitem <playerid> <itemID> <value>.
Now, let's say ID 44 is the "generic" item, meaning it can be anything the value says.
Performing the command is easy, simply /giveitem playerid 44 License.
Safing it wouldn't be a problem either, seeing I can just say
INI_WriteString(file, "GenericItem", value);
But here comes the question, how can I safe multiple generic items? Let's say I have given Joe bloggs a license, but now I want to give him a badge. If I do /giveitem <playerid> 44 badge now it will overwrite the license.
So how can I create an invent. system with multiple non-overwritable but deletable string?