/myhouses isuss
#1

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;
	}
Reply
#2

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


you calling every house !!! normal that it shows you every house
Reply
#3

So what its need be ?
Reply
#4

You must get the house you owned not max houses

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


Forum Jump:


Users browsing this thread: 2 Guest(s)