Hey Salut all, am si eu o problema la functia "CreateDynamic3DTextLabel" - La Load -ul de la Case & Biz (Nu vrea sa apara primul 3d text label la care ma apropi, si daca de exemplu daca mai e un label langa el, ala apare..
function LoadProps()
{
new Field[24], Field2[24], X, Rows, Fields, String[1024], ExpiredCount; cache_get_data(Rows, Fields, SQL);
new lvlstring[123];
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
for(new i = 0; i < Rows; i++)
{
X = CACHE(i, "ID", SQL);
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
CONTENT(i, "PropName", Field, SQL);
format(PropInfo[X][PropName], 24, "%s", Field);
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
CONTENT(i, "PropOwner", Field2, SQL);
format(PropInfo[X][PropOwner], 24, "%s", Field2);
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
PropInfo[X][PropX] = FLOAT(i, "PosX", SQL);
PropInfo[X][PropY] = FLOAT(i, "PosY", SQL);
PropInfo[X][PropZ] = FLOAT(i, "PosZ", SQL);
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
PropInfo[X][InteriorX] = FLOAT(i, "IntX", SQL);
PropInfo[X][InteriorY] = FLOAT(i, "IntY", SQL);
PropInfo[X][InteriorZ] = FLOAT(i, "IntZ", SQL);
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
PropInfo[X][IntID] = CACHE(i, "Interior", SQL);
PropInfo[X][p_Level] = CACHE(i, "Level", SQL);
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
PropInfo[X][Cost] = CACHE(i, "PropCost", SQL);
PropInfo[X][CostM] = CACHE(i, "PropCostM", SQL);
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
PropInfo[X][PTime] = CACHE(i, "PropTime", SQL);
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
PropInfo[X][Earning] = CACHE(i, "PropEarning", SQL);
PropInfo[X][EarningM] = CACHE(i, "PropEarningM", SQL);
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if(PropInfo[X][p_Level] == 1) lvlstring = "{FF9900}Standard";
if(PropInfo[X][p_Level] == 2) lvlstring = "{FF0000}Premium";
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if(strcmp(PropInfo[X][PropOwner], "Nobody", true) == 0)
{
PropInfo[X][PropMapIcon] = CreateDynamicMapIcon(PropInfo[X][PropX], PropInfo[X][PropY], PropInfo[X][PropZ], 52, 52);
format(String, sizeof(String), "{9C9621}\"%s\"\n{9C9621}Property is For Sale\n{2982FF}Cost: {00FF22}%d coins and $%d\n{2982FF}Win: {00FF22}%d coins and $%d\n{DE00BD}/business", PropInfo[X][PropName], PropInfo[X][Cost], PropInfo[X][CostM], PropInfo[X][Earning], PropInfo[X][EarningM]);
}
else
{
PropInfo[X][PropMapIcon] = CreateDynamicMapIcon(PropInfo[X][PropX], PropInfo[X][PropY], PropInfo[X][PropZ], 36, 36);
format(String, sizeof(String), "{9C9621}\"%s\"\n{2982FF}Business Owner: {00FF22}%s\n{2982FF}Business Level: %s\n\n{2982FF}Cost: {00FF22}%d coins and $%d\n{2982FF}Win: {00FF22}%d coins and $%d\n{DE00BD}/business", PropInfo[X][PropName], PropInfo[X][PropOwner], lvlstring, PropInfo[X][Cost], PropInfo[X][CostM], PropInfo[X][Earning], PropInfo[X][EarningM]);
}
Prop3D[X] = CreateDynamic3DTextLabel(String, ~1, PropInfo[X][PropX], PropInfo[X][PropY], PropInfo[X][PropZ], 30.0);
PropPickUP[X] = CreateDynamicPickup(1274, 1, PropInfo[X][PropX], PropInfo[X][PropY], PropInfo[X][PropZ]);
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if(strcmp(PropInfo[X][PropOwner], "Nobody", true) != 0 && PropInfo[X][PTime] < gettime())
{
format(PropInfo[X][PropName], 24, "ForSale"), format(PropInfo[X][PropOwner], 24, "Nobody");
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
DestroyDynamicMapIcon(PropInfo[X][PropMapIcon]);
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
PropInfo[X][PropMapIcon] = CreateDynamicMapIcon(PropInfo[X][PropX], PropInfo[X][PropY], PropInfo[X][PropZ], 52, 52);
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
format(String, sizeof(String), "{9C9621}\"%s\"\n{9C9621}Business is For Sale\n{2982FF}Cost: {00FF22}%d Coins and $%d\n{2982FF}Win: {00FF22}%d Coins and $%d\n{DE00BD}/business", PropInfo[X][PropName], PropInfo[X][Cost], PropInfo[X][CostM], PropInfo[X][Earning], PropInfo[X][EarningM]);
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
UpdateDynamic3DTextLabelText(Prop3D[X], ~1, String);
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
format(eQuery, 512, "UPDATE `Properties` SET `PropOwner` = 'Nobody', `PropName` = 'ForSale', `PropTime` = '0' WHERE `ID` = '%d'", X);
mysql_tquery(SQL, eQuery, "", "");
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
format(eQuery, sizeof(eQuery), "UPDATE `Accounts` SET `Property` = '0' WHERE `Property` = %d", X);
mysql_tquery(SQL, eQuery, "", "");
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
PropInfo[X][PTime] = 0, ExpiredCount++;
}
}
printf("Loaded %d Properties and %d reseted!", Rows, ExpiredCount);
return true;
}
Aic de exemplu, nu apare deloc: