
04-01-2010, 04:06 PM
|
team canada
|
 |
Join Date: Jul 2004
Location: Canada
Posts: 5,200
|
|
At the most basic level you could use something like this:
clientr.item.(@itemname) = {type, quantity};
or..
clientr.item.(@type).(@itemname) = quantity;
For easier implementation you'll want to make a class called itemfunctions and join it to the player when they login using a line like this:
player.join("itemfunctions");
Then in your itemfunctions class you could have public functions like addItem, takeItem, hasItem that you could use in your actual code, on the serverside to call those functions you would simply use:
player.addItem("Rocks", 999);
Of course the actual parameters would be different depending on the system but that's the basic gist of it. |
|
|