Help with name
#2

Make a function or a constant array that links each ID to a name..

Like
PHP код:
GetFurnitureName(id)
{
     new 
name[128];
     switch(
id)
     {
           case 
1429format(namesizeof(name), "TV");
     }
     return 
name;

or
PHP код:
enum furnitureenum
{
     
fID,
     
fName
}
new const 
Furnitures[MAX_FURNITURES][fEnum] = 
{
      {
1429,   "TV"}
}; 
And on loading...

PHP код:
Furniture[furnitureid][fName]; 
But make sure that the "furnitureid" in here is the order of the enum.. Not the model itself.
Reply


Messages In This Thread
Help with name - by ,TomY' - 25.07.2018, 17:39
Re: Help with name - by JasonRiggs - 25.07.2018, 18:23
Re: Help with name - by ,TomY' - 25.07.2018, 20:39

Forum Jump:


Users browsing this thread: 2 Guest(s)