13.06.2018, 16:52
Quote:
Dessa forma funcionou, porйm gerou outro bug, quando atualiza o 3DTextLabel ele fica sobreposto com o antigo em vez de atualizar
|
Код:
new Text3D:LabelCasa[MAX_CASAS]; CarregarCasa(casas) { new query[250]; new dono[64]; new PickupId; for(new c = 0; c < MAX_CASAS; c++) { format(query, sizeof(query), "Casas/Casa%d.ini", c); houseData[c][houseX] = DOF2_GetFloat(query, "PosX"); houseData[c][houseY] = DOF2_GetFloat(query, "PosY"); houseData[c][houseZ] = DOF2_GetFloat(query, "PosZ"); houseData[c][Dono] = DOF2_GetString(query, "Dono")); houseData[c][PrecoH] = DOF2_GetInt(query, "Preco"); houseData[c][CasaID] = DOF2_GetInt(query, "CasaId"); PickupId = CreateDynamicPickup(1273, 1, houseData[c][houseX], houseData[c][houseY], houseData[c][houseZ], -1, -1, -1, 3.0); DOF2_SetInt(query, "PickupId", PickupId); format(STRX, sizeof(STRX), "{00FFFF}Dono(a): {FFFFFF}%s \n\n{00FFFF}CasaID:{FFFFFF}%d", houseData[c][Dono], c); if(LabelCasa[c] == Text3D:INVALID_3DTEXT_ID) { LabelCasa[c] = CreateDynamic3DTextLabel(STRX, -1, houseData[c][houseX], houseData[c][houseY], houseData[c][houseZ], 30.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 3.0); } else { Update3DTextLabelText(LabelCasa[c], -1, STRX); } } return 1; }