25.07.2018, 18:23
Make a function or a constant array that links each ID to a name..
Like
or
And on loading...
But make sure that the "furnitureid" in here is the order of the enum.. Not the model itself.
Like
PHP код:
GetFurnitureName(id)
{
new name[128];
switch(id)
{
case 1429: format(name, sizeof(name), "TV");
}
return name;
}
PHP код:
enum furnitureenum
{
fID,
fName
}
new const Furnitures[MAX_FURNITURES][fEnum] =
{
{1429, "TV"}
};
PHP код:
Furniture[furnitureid][fName];