20.04.2015, 23:29
Quote:
Rule of thumb when designing dynamic systems.
- The return value for the creation function should be the INDEX in which the item was created. - All slots full? return -1 Furthermore...... Код:
if(Item[i][ItemPosX] == 0 && Item[i][ItemPosY] == 0 && Item[i][ItemPosZ] == 0) What you should do is this. Define your item types Код:
#define ITEM_TYPE_NONE 0 #define ITEM_TYPE_DEAGLE 1 #define ITEM_TYPE_SPAS 2 Код:
if(Item[i][ItemType] == ITEM_TYPE_NONE) Код:
stock DropItem(model, amount, type, Float:X, Float:Y, Float:Z, world, interior) This belongs in the enum not it's own variable! Код:
DropObject[i] = CreateObject(model, X, Y, Z, RX, RY, RZ, world); Код:
return i; |