SA-MP Forums Archive
[HELP] House loading system - 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] House loading system (/showthread.php?tid=139475)



[HELP] House loading system - MahmutBey - 05.04.2010

Hello guys,

I'm making a house system. So Firstly I need to do this.

But I have a problem.

Problem : I want fprint per loaded house. And I want show the house owner in fprint. But it seems entree coordinates.



MY PUBLIC
Код:
forward EvleriYukle();
public EvleriYukle()
{
	new File: file = fopen("evler.cfg", io_read);
	if (file)
	{
		new idx;
		while (idx < sizeof(EvBilgisi))
		{
			new yuklenen[256];
			new key[256];
			new val[256];
			new Data[256];
			key = ini_GetKey( Data );

			fread(file,Data,sizeof(Data));
			
			format(yuklenen,sizeof(yuklenen),"GirisX_%d",idx);
			if( strcmp( key , yuklenen , true ) == 0 )
			{
				val = ini_GetValue( Data );
				EvBilgisi[idx][eGirisX] = floatstr( val );
			}
			format(yuklenen,sizeof(yuklenen),"GirisY_%d",idx);
			if( strcmp( key , yuklenen , true ) == 0 )
			{
				val = ini_GetValue( Data );
				EvBilgisi[idx][eGirisY] = floatstr( val );
			}
			format(yuklenen,sizeof(yuklenen),"GirisZ_%d",idx);
			if( strcmp( key , yuklenen , true ) == 0 )
			{
				val = ini_GetValue( Data );
				EvBilgisi[idx][eGirisZ] = floatstr( val );
			}
			format(yuklenen,sizeof(yuklenen),"CikisX_%d",idx);
			if( strcmp( key , yuklenen , true ) == 0 )
			{
				val = ini_GetValue( Data );
				EvBilgisi[idx][eCikisX] = floatstr( val );
			}
			format(yuklenen,sizeof(yuklenen),"CikisY_%d",idx);
			if( strcmp( key , yuklenen , true ) == 0 )
			{
				val = ini_GetValue( Data );
				EvBilgisi[idx][eCikisY] = floatstr( val );
			}
			format(yuklenen,sizeof(yuklenen),"CikisZ_%d",idx);
			if( strcmp( key , yuklenen , true ) == 0 )
			{
				val = ini_GetValue( Data );
				EvBilgisi[idx][eCikisZ] = floatstr( val );
			}
			format(yuklenen,sizeof(yuklenen),"Fiyat_%d",idx);
			if( strcmp( key , yuklenen , true ) == 0 )
			{
				val = ini_GetValue( Data );
				EvBilgisi[idx][eFiyat] = strval( val );
			}
			format(yuklenen,sizeof(yuklenen),"Interior_%d",idx);
			if( strcmp( key , yuklenen , true ) == 0 )
			{
				val = ini_GetValue( Data );
				EvBilgisi[idx][eInterior] = strval( val );
			}
			format(yuklenen,sizeof(yuklenen),"VirWorld_%d",idx);
			if( strcmp( key , yuklenen , true ) == 0 )
			{
				val = ini_GetValue( Data );
				EvBilgisi[idx][eVirWorld] = strval( val );
			}
			format(yuklenen,sizeof(yuklenen),"Kilit_%d",idx);
			if( strcmp( key , yuklenen , true ) == 0 )
			{
				val = ini_GetValue( Data );
				EvBilgisi[idx][eKilit] = strval( val );
			}
			format(yuklenen,sizeof(yuklenen),"Kira_%d",idx);
			if( strcmp( key , yuklenen , true ) == 0 )
			{
				val = ini_GetValue( Data );
				EvBilgisi[idx][eKira] = strval( val );
			}
			format(yuklenen,sizeof(yuklenen),"Kiralama_%d",idx);
			if( strcmp( key , yuklenen , true ) == 0 )
			{
				val = ini_GetValue( Data );
				EvBilgisi[idx][eKiralama] = strval( val );
			}
			format(yuklenen,sizeof(yuklenen),"Seviye_%d",idx);
			if( strcmp( key , yuklenen , true ) == 0 )
			{
				val = ini_GetValue( Data );
				EvBilgisi[idx][eSeviye] = strval( val );
			}
			format(yuklenen,sizeof(yuklenen),"Satilik_%d",idx);
			if( strcmp( key , yuklenen , true ) == 0 )
			{
				val = ini_GetValue( Data );
				EvBilgisi[idx][eSatilik] = strval( val );
			}
			format(yuklenen,sizeof(yuklenen),"Sahibi_%d",idx);
			if( strcmp( key , yuklenen , true ) == 0 )
			{
				val = ini_GetValue( Data );
				strmid(EvBilgisi[idx][eSahibi], val, 0, strlen(val), 255);
			}
			format(yuklenen,sizeof(yuklenen),"Aciklama_%d",idx);
			if( strcmp( key , yuklenen , true ) == 0 )
			{
				val = ini_GetValue( Data );
				strmid(EvBilgisi[idx][eAciklama], val, 0, strlen(val), 255);
			}

			printf("Yuklenen - EV:%d Sahibi:%s",idx,EvBilgisi[idx][eSahibi]);
			idx++;
		}
		fclose(file);
	}
	return 1;
}
MY CFG FILE
Код:
GirisX_0=1729.5907
GirisY_0=-1852.6173
GirisZ_0=13.4141
CikisX_0=1714.9644
CikisY_0=-1877.9821
CikisZ_0=13.5666
Fiyat_0=1500
Interior_0=1
VirWorld_0=0
Kilit_0=0
Kira_0=150
Kiralama_0=1
Seviye_0=15
Satilik_0=0
Sahibi_0=Mahmut_Bey
Aciklama_0=Hosgeldiniz



Re: [HELP] House loading system - scott1 - 05.04.2010

Can you show us your log, at the start of the server.


Re: [HELP] House loading system - MahmutBey - 05.04.2010

It seems...
Код:
[18:06:48] Yuklenen - EV:0 Sahibi:1729.5907
But it must show such:
Код:
[18:06:48] Yuklenen - EV:0 Sahibi:Name_Surname



Re: [HELP] House loading system - MahmutBey - 05.04.2010

resuming.....