Hello. I need help on this programming stuff, I'm not very good at this.
In this part of the script, the idea is to link the Items to the 3d model it is used for each. Originally, many different items used the same model, so there was a list in there for this purpose. But now I linked all of the items to an unique 3d model value, and matched the number on purpose just to keep it easy. This is how I did it:
#ifdef PLAYERS_3D
int GetHandleValue( uint16 pid )
{
if( pid == 0 || ( pid >= 1000 && pid <= 1100 ) )
return 0;
int handle = 0;
switch( pid )
{
case 1 : handle = 1 ; break;
case 2 : handle = 2 ; break;
case 3 : handle = 3 ; break;
case 4 : handle = 4 ; break;
...
and so on.
...
}
return handle;
}
#endif
Does it work? yes, it does. Now, since all of the Items PIDs match the value I set for the 3d models, I think there has to be a better way to solve this.
What should that be?
Thanks.