Jump to content
  • 0

Casa


Versace

Recommended Posts

  • 0
6 minutes ago, WopsS said:

Si nu ai nimic in gamemode care sa citeasca properties.cfg?

public LoadProperty()
{
	new arrCoords[30][64];
	new strFromFile2[256];
	new File: file = fopen("cfg/property.cfg", io_read);
	if (file)
	{
		new idx;
		while (idx < sizeof(HouseInfo))
		{
			fread(file, strFromFile2);
			split(strFromFile2, arrCoords, ',');
			HouseInfo[idx][hEntrancex] = floatstr(arrCoords[0]);
			HouseInfo[idx][hEntrancey] = floatstr(arrCoords[1]);
			HouseInfo[idx][hEntrancez] = floatstr(arrCoords[2]);
			HouseInfo[idx][hExitx] = floatstr(arrCoords[3]);
			HouseInfo[idx][hExity] = floatstr(arrCoords[4]);
			HouseInfo[idx][hExitz] = floatstr(arrCoords[5]);
			HouseInfo[idx][hHealthx] = strval(arrCoords[6]);
			HouseInfo[idx][hHealthy] = strval(arrCoords[7]);
			HouseInfo[idx][hHealthz] = strval(arrCoords[8]);
			HouseInfo[idx][hArmourx] = strval(arrCoords[9]);
			HouseInfo[idx][hArmoury] = strval(arrCoords[10]);
			HouseInfo[idx][hArmourz] = strval(arrCoords[11]);
			//printf("HouseInfo hEntrancez %f",HouseInfo[idx][hEntrancez]);
			strmid(HouseInfo[idx][hOwner], arrCoords[12], 0, strlen(arrCoords[12]), 255);
			strmid(HouseInfo[idx][hDiscription], arrCoords[13], 0, strlen(arrCoords[13]), 255);
			HouseInfo[idx][hValue] = strval(arrCoords[14]);
			HouseInfo[idx][hHel] = strval(arrCoords[15]);
			HouseInfo[idx][hArm] = strval(arrCoords[16]);
			HouseInfo[idx][hInt] = strval(arrCoords[17]);
			HouseInfo[idx][hLock] = strval(arrCoords[18]);
			HouseInfo[idx][hOwned] = strval(arrCoords[19]);
			HouseInfo[idx][hRooms] = strval(arrCoords[20]);
			HouseInfo[idx][hRent] = strval(arrCoords[21]);
			HouseInfo[idx][hRentabil] = strval(arrCoords[22]);
			HouseInfo[idx][hTakings] = strval(arrCoords[23]);
			HouseInfo[idx][hVec] = strval(arrCoords[24]);
  	        if(HouseInfo[idx][hVec] == 457)
			{
				HouseInfo[idx][hVec] = 411;
			}
			HouseInfo[idx][hVcol1] = strval(arrCoords[25]);
			HouseInfo[idx][hVcol2] = strval(arrCoords[26]);
			HouseInfo[idx][hDate] = strval(arrCoords[27]);
			HouseInfo[idx][hLevel] = strval(arrCoords[28]);
			HouseInfo[idx][hWorld] = strval(arrCoords[29]);

			printf("HouseInfo:%d Owner:%s hTakings %d hVec %d",idx,HouseInfo[idx][hOwner],HouseInfo[idx][hTakings],HouseInfo[idx][hVec]);
			idx++;
		}
		fclose(file);
	}
	return 1;
}

 

Link to comment
Share on other sites

  • 0
1 minute ago, WopsS said:

La ce ai adaugat tu acolo ar trebui sa aiba 30 de elemente, si eu vad doar 23.

Imi poti face tu o casa oriunde si imi spui unde este si o sa fac si eu dupa acel model,undeva in sosea ca sa fie deja o casa creata.

Link to comment
Share on other sites

  • 0
1 minute ago, w1zzan said:

Imi poti face tu o casa oriunde si imi spui unde este si o sa fac si eu dupa acel model,undeva in sosea ca sa fie deja o casa creata.

x,x,x,225.600021,1289.617431,1082.140625,0,0,0,0,0,0,The State,New house,3000000,0,0,1,1,0,0,500,1000,0,418,-1,-1,226,10,132

Modifica x,x,x cu coodronatele unde sa fie intrarea.

  • Upvote 1
Link to comment
Share on other sites

  • 0
16 minutes ago, WopsS said:

x,x,x,225.600021,1289.617431,1082.140625,0,0,0,0,0,0,The State,New house,3000000,0,0,1,1,0,0,500,1000,0,418,-1,-1,226,10,132

Modifica x,x,x cu coodronatele unde sa fie intrarea.

Iti multumesc mult imi poti spune care este id-ul la casa ca ai pus id 0 si se buguieste.

Link to comment
Share on other sites

  • 0
1 hour ago, w1zzan said:

Iti multumesc mult imi poti spune care este id-ul la casa ca ai pus id 0 si se buguieste.

Nu stiu ce id are, ce e acolo este pentru o casa pe care o ai tu prin acel fisier. Ultimul numar este virtual world-ul (asta inteleg eu din hWorld).

Link to comment
Share on other sites

  • 0

Nu iti incarca casele doare tu initial ai 200 de case, cand mai adaugi trebuie sa schimbi valoarea acestei case, pentru ca contorul tau sa ti le incarce pe restul new HouseInfo[200][hInfo]; . Adica daca ai mai adaugat 50 de case, atunci va veni asa new HouseInfo[250][hInfo]; . Cifra accea fiind numarul total de case.

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.