SA-MP Forums Archive
/myhouses isuss - 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)
+--- Thread: /myhouses isuss (/showthread.php?tid=377000)



/myhouses isuss - BlueGames - 12.09.2012

Hi,
when i doing /myhouses show up 1,000 houses

Код:
if(strcmp(cmdtext,"/myhouses",true)==0) //add till
	{
	    new ownh[MAX_STRING],asker[MAX_STRING];
	      new avay;
	    SendClientMessage(playerid,COLOR_BRIGHTRED,"=====================================[HOUSES]==========================================");
			new bizfile[73];
			   for(new h = 0; h < MAX_HOUSES; h++)
			    {
		  	format(bizfile,sizeof(bizfile),"Houses/Casa%d.txt",h);
			ownh = dini_Get(bizfile,"owner");
			avay=dini_Int(bizfile,"buyable");
        	format(asker, MAX_STRING, "%s", PlayerName(playerid));
        	if(avay==0)
			{
        	  if(strcmp(asker,ownh,false)==0)
		        {
					if(strcmp(dini_Get(bizfile,"owner"),PlayerName(playerid),false)==0)
					{
new stringa[MAX_STRING];

		new text[60];
			if(dini_Int(bizfile,"closed") == 1) { text = "Yes"; }
			if(dini_Int(bizfile,"closed") == 0) { text = "No"; }
			format(stringa,sizeof(stringa),"House ID: %d, Dupekey: %s, Rentprice: %d$, Closed: %s, Interiorpack: %d",h,dini_Get(bizfile,"dupekey"),dini_Int(bizfile,"rentprice"),text,dini_Int(bizfile,"interiorpack"));
			SendClientMessage(playerid,COLOR_GREY,stringa);
										}
				}
				}
	//	else continue;
		}
		return 1;
	}



AW: /myhouses isuss - BiosMarcel - 12.09.2012

What the .... is this? for new h ...... MAX_HOUSES


you calling every house !!! normal that it shows you every house


Re: /myhouses isuss - BlueGames - 12.09.2012

So what its need be ?


AW: /myhouses isuss - BiosMarcel - 12.09.2012

You must get the house you owned not max houses

don't know you files so i can't help (-: