16.10.2017, 23:20
At times like these, one wishes pawn supported classes, it would have made our lives much easier. But hey, a good developer is one who works around problems with what he/she has.
Dignity's method is the most approachable I'd say.
Let's assume an apple which is item ID 46, want to make it infected?
want to store 12 bullets in a shotgun ammo box?
I believe this method would work just fine, not too much heavy on memory, and to me looks efficient.
Would like to be corrected if I'm mistaken.
Dignity's method is the most approachable I'd say.
PHP код:
enum ENUM_ITEM
{
e_item_id,
e_item_condition
}
new item_info[MAX_ITEMS][ENUM_ITEM];
PHP код:
#define ITEM_STATE_INFECTED 1
#define ITEM_STATE_INFECTED 2
item_info[item_id][e_item_condition] = ITEM_STATE_INFECTED;
PHP код:
item_info[item_id][e_item_condition] = 12;
Would like to be corrected if I'm mistaken.

