13.11.2015, 12:40
Maybe create a FurnObject in the enum.
And when a furniture object is created, Store that ID in the array to be used later on.
And to get the index from the ID, Just use this func:
And ofcourse use PVars to have the objectid as I already said.
And when a furniture object is created, Store that ID in the array to be used later on.
And to get the index from the ID, Just use this func:
PHP код:
GetFurnIndex(objectid)
{
for(new FurnLoop = 0; FurnLoop < MAX_FURNITURE; FurnLoop++)
{
if(HouseFurni[FurnLoop][FurnObject] == objectid) return FurnLoop;
}
return -1;
}