SA-MP Forums Archive
/houses command - 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: /houses command (/showthread.php?tid=328147)



/houses command - [LHT]Bally - 23.03.2012

how can i make a command like say /houses

and it then displays all the properties that are for sale in dialog


Re: /houses command - antonio112 - 23.03.2012

You need to loop through all your houses and check if any of all houses is for sale:
pawn Код:
#define MAX_HOUSES 100 // Here you insert number of houses you have

for (new i = 0; i<MAX_HOUSES; i++)
{
              if(HouseInfo[i][Owned] == false)
              {
                           // the dialog here
               }
}
Hope that gave you an idea about how you should do it.