[Filtercript] Simple House system (not mine) -- is anybody good at adding 3d text labels to pickups?
#3

Quote:
Originally Posted by DarkLored
Посмотреть сообщение
its very simple here is the link
its like making a message just it stays there forever
https://sampwiki.blast.hk/wiki/Create3DTextLabel
Is it really that easy?
Код:
But how would I incorporate the correct information into the text (owner, renter, cost,etc.) and keep it updated?
NVM that, but how would I pick out information that the script uses like the owner,renter,etc.?

This is some text from a different script, but im confused how it works...
Код:
format(labelstring,sizeof(labelstring),""COL_YELLOW"[ Name ]: "COL_WHITE"%s\n"COL_GREEN"[ Owner ]: "#COL_WHITE#"Yes\n"COL_PURPLE" [ Level ] : %i\n"COL_GREEN"[ Price ]: "#COL_LIME#"%i\n[ Owner ]: %s",HouseInfo[i][Name],HouseInfo[i][Level],HouseInfo[i][Price],pname);
OH I think I get it...

I lied, I'm stuck :/

Код:
C:\Users\Aerotactics' PC\Desktop\ALSRP\filterscripts\aHouse.pwn(232) : warning 213: tag mismatch
C:\Users\Aerotactics' PC\Desktop\ALSRP\filterscripts\aHouse.pwn(233) : error 017: undefined symbol "labelstring"
C:\Users\Aerotactics' PC\Desktop\ALSRP\filterscripts\aHouse.pwn(233) : error 017: undefined symbol "labelstring"
C:\Users\Aerotactics' PC\Desktop\ALSRP\filterscripts\aHouse.pwn(233) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Aerotactics' PC\Desktop\ALSRP\filterscripts\aHouse.pwn(233) : fatal error 107: too many error messages on one line
The script (I have no idea what Im doing):
Код:
AddHouse(houseid, Float:iconX, Float:iconY, Float:iconZ, Float:interiorX, Float:interiorY, Float:interiorZ, Costa, Sella, Interiora, virtualworld)
{
	new house[256];
	format(house, sizeof(house), "Houses/houseid%d",houseid);
	if(!dini_Exists(house))
	{
		dini_Create(house);
		format(hInfo[houseid][Name], 24, "ForSale");
		dini_Set(house, "Name", "ForSale");
		format(hInfo[houseid][Renter], 24, "ForRent");
		dini_Set(house, "Renter", "ForRent");
		hInfo[houseid][Rentable] = 0;
		dini_IntSet(house, "Rentable", 0);
		hInfo[houseid][Rentcost] = 0;
		dini_IntSet(house, "Rentcost", 0);
		hInfo[houseid][Cost] = Costa;
		dini_IntSet(house, "Cost", Costa);
		hInfo[houseid][Sell] = Sella;
		dini_IntSet(house, "Sell", Sella);
		hInfo[houseid][Interior] = Interiora;
		dini_IntSet(house, "Interior", Interiora);
		dini_IntSet(house, "Virtualworld", virtualworld);
		hInfo[houseid][Virtualworld] = virtualworld;
		hInfo[houseid][Locked] = 1;
		dini_IntSet(house, "Locked", 1);
		hInfo[houseid][InteriorX] = interiorX;
		hInfo[houseid][InteriorY] = interiorY;
		hInfo[houseid][InteriorZ] = interiorZ;
		dini_FloatSet(house, "X", interiorX);
		dini_FloatSet(house, "Y", interiorY);
		dini_FloatSet(house, "Z", interiorZ);
		dini_IntSet(house, "RentPay", 0);
		dini_IntSet(house, "RentGet", 0);
		cInfo[houseid][HouseCar] = 429;
		dini_IntSet(house, "HouseCar", 0);
		cInfo[houseid][CarModel] = 429;
		dini_IntSet(house, "CarModel", 0);
		cInfo[houseid][CarX] = 0;
		cInfo[houseid][CarY] = 0;
		cInfo[houseid][CarZ] = 0;
		dini_FloatSet(house, "CarX", 0);
		dini_FloatSet(house, "CarY", 0);
		dini_FloatSet(house, "CarZ", 0);
		cInfo[houseid][CarColor1] = 0;
		cInfo[houseid][CarColor2] = 0;
		dini_IntSet(house, "CarColor1", 0);
		dini_IntSet(house, "CarColor2", 0);
		cInfo[houseid][GotCar] = 0;
		print("-");
		print("--------------House Created--------------");
		printf("- Houseid: %d", houseid);
		printf("- Buy Cost: %d", Costa);
		printf("- Sell Cost: %d", Sella);
		printf("- Interior: %d", Interiora);
		printf("- VirtualWorld: %d", virtualworld);
		print("-----------------------------------------");
		print("-");
	}
	else
	{
	    format(hInfo[houseid][Name], 24, dini_Get(house, "Name"));
	    format(hInfo[houseid][Renter], 24, dini_Get(house, "Renter"));
		hInfo[houseid][Rentable] = dini_Int(house, "Rentable");
		hInfo[houseid][Rentcost] = dini_Int(house, "Rentcost");
	    hInfo[houseid][Cost] = dini_Int(house, "Cost");
	    hInfo[houseid][Sell] = dini_Int(house, "Sell");
	    hInfo[houseid][Interior] = dini_Int(house, "Interior");
	    hInfo[houseid][Locked] = dini_Int(house, "Locked");
	    hInfo[houseid][InteriorX] = dini_Float(house, "X");
	    hInfo[houseid][InteriorY] = dini_Float(house, "Y");
		hInfo[houseid][InteriorZ] = dini_Float(house, "Z");
		hInfo[houseid][Virtualworld] = dini_Int(house, "Virtualworld");
	}
    hInfo[houseid][iconx]=iconX;
	hInfo[houseid][icony]=iconY;
	hInfo[houseid][iconz]=iconZ;
	format(house, sizeof(house), "Houses/houseid%d",houseid);
	if(strcmp(hInfo[houseid][Name],"ForSale",true)==0)
	{
		HousePickup[houseid] = CreatePickup(1273, 23, iconX, iconY, iconZ);//not bought
		HLabel=Create3DTextLabel("_", 0x008080FF, iconX, iconY, iconZ, 40.0, 0, 0);//232
		format(labelstring,sizeof(labelstring),""c_y"[ Owner ]: "c_w"%s\n"c_y"[ Price ]: "c_w"%i",hInfo[houseid][Name],hInfo[houseid][Cost]);//233
  		Update3DTextLabelText(HLabel,0xFF0000FF,labelstring);
	}
	else
	{
	    //\n[ Renter ]: %s\n"c_y"[ Rent Cost ]: "c_w"$%i per hour
		HousePickup[houseid] = CreatePickup(1272,23, iconX, iconY, iconZ);//bought
	}
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)