24.01.2012, 16:23
Hey I've started my dynamic house system, so destroying the 3d text and pickup has become an issue, i have it to destroy and recreate, but it only recreates and doesn't destroy . Heres the code:
Enum part:
In the create house command:
Move house command part:
Thanks in advance for any support. Here's an image to show what I'm talking about:
Enum part:
pawn Код:
hPickup,
Text3D:hText
pawn Код:
HouseInfo[Total_House_Created][hPickup] = CreateDynamicPickup(1273, 1, HouseInfo[Total_House_Created][hEntranceX],HouseInfo[Total_House_Created][hEntranceY], HouseInfo[Total_House_Created][hEntranceZ],0);
format(string, sizeof(string), "House: %i \nPrice: $%d \nOwner: The State", Total_House_Created, HouseInfo[Total_House_Created][hPrice]);
HouseInfo[Total_House_Created][hText] = Create3DTextLabel(string,0xFF8000FF,HouseInfo[Total_House_Created][hEntranceX],HouseInfo[Total_House_Created][hEntranceY], HouseInfo[Total_House_Created][hEntranceZ],20.0,0);
pawn Код:
DestroyDynamicPickup(HouseInfo[houseid][hPickup]);
DestroyDynamic3DTextLabel(HouseInfo[houseid][hText]);
format(string, sizeof(string), "House: %i \nPrice: $%d \nOwner: The State", houseid, HouseInfo[houseid][hPrice]);
HouseInfo[houseid][hText] = Create3DTextLabel(string,0xFF8000FF,HouseInfo[houseid][hEntranceX],HouseInfo[houseid][hEntranceY], HouseInfo[houseid][hEntranceZ],20.0,0);
HouseInfo[houseid][hPickup] = CreateDynamicPickup(1273, 1, HouseInfo[houseid][hEntranceX],HouseInfo[houseid][hEntranceY], HouseInfo[houseid][hEntranceZ],0);
Thanks in advance for any support. Here's an image to show what I'm talking about: