SA-MP Forums Archive
to get a value from a var - 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: to get a value from a var (/showthread.php?tid=84874)



to get a value from a var - RonLipel_ - 03.07.2009

I have this variable:
Код:
Houses[0][houseid]
The houseid is unknown.
how can i get the value of "houseid"?
ty.


Re: to get a value from a var - woot - 03.07.2009

Your question doesn't make any sense, what about looking into your enum for the houses?


Re: to get a value from a var - RonLipel_ - 03.07.2009

Код:
	for(new houseid = 0; houseid < MAX_HOUSES; houseid++)
	{
	  format(housefile, 200, "%d.txt", houseid);
	  if(dini_Exists(housefile))
			Houses[0][houseid] = CreatePickup(dini_Int(housefile, "Sold") == 0? NOT_SOLD : SOLD, 1, dini_Float(housefile, "X"), dini_Float(housefile, "Y"), dini_Float(housefile, "Z")),
			Houses[1][houseid] = CreatePickup(dini_Int(housefile, "Sold") == 0? NOT_SOLD : SOLD, 1, dini_Float(housefile, "InteriorX"), dini_Float(housefile, "InteriorY"), dini_Float(housefile, "InteriorZ"));
	}



Re: to get a value from a var - Ignas1337 - 03.07.2009

chea you're totally out of your mind if you ask that. are you.. high?
(the first one)


Re: to get a value from a var - woot - 03.07.2009

Create your "housesystem" using enum's.


Re: to get a value from a var - RonLipel_ - 03.07.2009

Quote:
Originally Posted by Izanagi
chea you're totally out of your mind if you ask that. are you.. high?
(the first one)