29.10.2015, 14:24
So I've tried to use the singleplayer info box by Kevln but I've got another problem which I have in my housing system -
When I try to compile, it gives me an error that I can't use player id in this stock, how do I add the player id that stands on the pickup, then it will show the "ShowInfoBox".
Thanks for the assistence, +rep to who will fix this.
PHP код:
House_Refresh(houseid)
{
if (houseid != -1 && HouseData[houseid][houseExists])
{
if (IsValidDynamic3DTextLabel(HouseData[houseid][houseText3D]))
DestroyDynamic3DTextLabel(HouseData[houseid][houseText3D]);
if (IsValidDynamicPickup(HouseData[houseid][housePickup]))
DestroyDynamicPickup(HouseData[houseid][housePickup]);
if (IsValidDynamicMapIcon(HouseData[houseid][houseMapIcon]))
DestroyDynamicMapIcon(HouseData[houseid][houseMapIcon]);
static
string[128];
if (!HouseData[houseid][houseOwner]) {
format(string, sizeof(string), "Price: %s\nAddress: %s", FormatNumber(HouseData[houseid][housePrice]), HouseData[houseid][houseAddress]);
HouseData[houseid][houseText3D] = CreateDynamic3DTextLabel(string, COLOR_NICEBLUE, HouseData[houseid][housePos][0], HouseData[houseid][housePos][1], HouseData[houseid][housePos][2], 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, HouseData[houseid][houseExteriorVW], HouseData[houseid][houseExterior]);
}
else {
//format(string, sizeof(string), "Owned house\nAddress: %s", HouseData[houseid][houseAddress]);
//HouseData[houseid][houseText3D] = CreateDynamic3DTextLabel(string, COLOR_NICEDBLUE, HouseData[houseid][housePos][0], HouseData[houseid][housePos][1], HouseData[houseid][housePos][2], 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, HouseData[houseid][houseExteriorVW], HouseData[houseid][houseExterior]);
format(string, sizeof(string), "Owned house\nAddress: %s", HouseData[houseid][houseAddress]);
ShowInfoBox(playerid, 0xFF0000FF, 10, string);
}
HouseData[houseid][housePickup] = CreateDynamicPickup(1559, 23, HouseData[houseid][housePos][0], HouseData[houseid][housePos][1], HouseData[houseid][housePos][2], HouseData[houseid][houseExteriorVW], HouseData[houseid][houseExterior]);
//HouseData[houseid][houseMapIcon] = CreateDynamicMapIcon(HouseData[houseid][housePos][0], HouseData[houseid][housePos][1], HouseData[houseid][housePos][2], (HouseData[houseid][houseOwner] != 0) ? (32) : (31), 0, HouseData[houseid][houseExteriorVW], HouseData[houseid][houseExterior]);
}
return 1;
}
Thanks for the assistence, +rep to who will fix this.