13.12.2016, 08:19
Make an array with all the furniture object names, ids and cost, loop the array and show them as a list in a dialog box, if player has enough money for the furniture, create a player object and let the player edit it.
for example:
for example:
PHP код:
#define MAX_FURNITURE (7)
enum E_Furniture
{
ModelName[15],
ModelObject,
ModelPrice
};
new const gFurniture[MAX_FURNITURE][E_Furniture] =
{
{"TV remote", 19920, 50},
{"Clock", 19825, 50},
{"Books", 2813, 20},
{"Old TV", 14772, 100},
{"Magazines", 2827, 20},
{"TV", 1518, 200},
{"Grey TV", 2322, 300}
};