SA-MP Forums Archive
Help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help (/showthread.php?tid=156609)



Help - traxrex - 23.06.2010

My house Description is "Rayden's House"
But in /stats it Comes as Description:[R, 2]

Код:
		new houserb = HouseInfo[targetid][hRentabil]
		new houserent = HouseInfo[targetid][hRent];
		new houselock = HouseInfo[targetid][hLock];
		new housevalue = HouseInfo[targetid][hValue];
		new housedes = HouseInfo[targetid][hDiscription];
		new housekey = PlayerInfo[targetid][pPhousekey];

		if (PlayerInfo[targetid][pPhousekey] != 999)
		{
     format(coordsstring, sizeof(coordsstring), "[Property]: HouseID:[%d] Description:[%s] Value:[%d] Locked:[%d] Rentable:[%d] Rent:[%d]",housekey, housedes, housevalue, houselock, houserb, houserent);
		  SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
		 }



Re: Help - traxrex - 23.06.2010

please help me


Re: Help - CAR - 23.06.2010

Where is "HouseInfo[targetid][hDiscription]" get, please give me something like this
pawn Код:
format(HouseInfo[targetid][hDiscription], 20, "%s", dini_Get(...));
Or whatever you got in your script, where it gets that function


Re: Help - Finn - 23.06.2010

This is where that code most probably goes wrong - if hDiscription is a string:

pawn Код:
new housedes = HouseInfo[targetid][hDiscription];



Re: Help - CAR - 23.06.2010

Lol, yeah, maybe you better can put in the message the code
HouseInfo[targetid][hDiscription];

like this:
pawn Код:
format(coordsstring, sizeof(coordsstring), "[Property]: HouseID:[%d] Description:[%s] Value:[%d] Locked:[%d] Rentable:[%d] Rent:[%d]",housekey, HouseInfo[targetid][hDiscription];, housevalue, houselock, houserb, houserent);
SendClientMessage(playerid, COLOR_GRAD5,coordsstring);



Re: Help - traxrex - 23.06.2010

i got it from here
Код:
public OnPropTextdrawUpdate()
{
	new PropertyString[128];
	for(new h = 0; h < sizeof(HouseInfo); h++)
	{
		if(HouseInfo[h][hOwned] == 0)
		{
		  if(HouseInfo[h][hEntrancex] != 0.000000 && HouseInfo[h][hEntrancey] != -1250.349243 && HouseInfo[h][hEntrancez] != 78.334503)
		  {
		    Delete3DTextLabel(HouseLabel[h]);
			  format(PropertyString,sizeof(PropertyString),"House is UNOWNED! \n House ID: %d \n Price: $%d \n Description: %s \n Level Needed: %d",HouseInfo[h][hWorld], HouseInfo[h][hValue],HouseInfo[h][hDiscription], HouseInfo[h][hLevel]);
				HouseLabel[h] = Create3DTextLabel(PropertyString ,0x00FF00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],25, 0, 1);
			}
		}
		if(HouseInfo[h][hOwned] == 1)
		{
		  Delete3DTextLabel(HouseLabel[h]);
			format(PropertyString,sizeof(PropertyString),"House is Owned by %s \n House ID: %d \n Rent Price: $%d \n Description: %s \n To Rent Type /rentroom", HouseInfo[h][hOwner],HouseInfo[h][hWorld], HouseInfo[h][hRent], HouseInfo[h][hDiscription]);
			HouseLabel[h] = Create3DTextLabel(PropertyString ,0x00FFFFFF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],25, 0, 1);
		}
	}