if(strcmp(hInfo[houseid][Name],"ForSale",true)==0) { HousePickup[houseid] = CreatePickup(1273, 23, iconX, iconY, iconZ);//not bought format(HPickupForSale,sizeof(HPickupForSale), "[ Owner ]: %s \n[ Price ] %i",hInfo[houseid][Name],hInfo[houseid][Cost]); Create3DTextLabel(HPickupForSale, 0x008080FF, iconX, iconY, iconZ, 30.0, 0, 0); } else { HousePickup[houseid] = CreatePickup(1272,23, iconX, iconY, iconZ);//bought format(HPickupOwned,sizeof(HPickupOwned), "[ Owner ]: %s",hInfo[houseid][Name]); Create3DTextLabel(HPickupOwned, 0x008080FF, iconX, iconY, iconZ, 30.0, 0, 0); }
https://sampwiki.blast.hk/wiki/Create3DTextLabel
You can see in the related functions: https://sampwiki.blast.hk/wiki/Update3DTextLabelText As for your off topic: I don't really think so as long as the questions you've got are all different queries. |
hInfo[houseid][iconx]=iconX; hInfo[houseid][icony]=iconY; hInfo[houseid][iconz]=iconZ; format(house, sizeof(house), "Houses/houseid%d",houseid); format(HPickupText,sizeof(HPickupText), "[ Owner ]: %s \n[ Price ] $%i\n[ Renter ] %s \n[ Rent Price ] $%i an hour",hInfo[houseid][Name],hInfo[houseid][Cost],hInfo[houseid][Renter],hInfo[houseid][Rentcost]); Create3DTextLabel(HPickupText, 0xFFCC00, iconX, iconY, iconZ, 30.0, 0, 0); if(strcmp(hInfo[houseid][Name],"ForSale",true)==0) { HousePickup[houseid] = CreatePickup(1273, 23, iconX, iconY, iconZ);//not bought Update3DTextLabelText(HPickupText, 0x00CC00FF, "[ Owner ]: %s \n[ Price ] $%i",hInfo[houseid][Name],hInfo[houseid][Cost]); } else { HousePickup[houseid] = CreatePickup(1272,23, iconX, iconY, iconZ);//bought Update3DTextLabelText(HPickupText, 0x00CC00FF, "[ Owner ]: %s \n[ Price ] $%i",hInfo[houseid][Name],hInfo[houseid][Cost]); }
You need to store the ID of the 3D text that is created when creating the Label in a variable, the same way you already do with the HousePickup variable; There's an example in the wiki on how to do that, please do read it.
You get the error/warning because HPickupText is merely the text that was previously saved, the input needs to be numerical, and equals to the ID of the label to update. |