Jump to content
  • 0

Problema CreateDynamic3DTextLabel


ghosty2004

Question

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: image.thumb.png.40332d92d486066e9467b4cb915e701c.png

Edited by Ghost.

spacer.png

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0
  • 0
  • 0
  • 0
  • 0

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.