Jump to content
  • 0

Bug TEXT


blan3

Question

Problema intalnita (descriere):Am modificat la case text-ul insa imi apare o mica erroare de scriere si nu inteleg de ce, am verificat totul in detaliu si nu pot sa-mi dau seama.Check IMAGE
Ero(area / rile) / warning-(ul / urile):-
Liniile de cod / sursa / script-ul(obligatoriu):

stock HouseUpdate(houseid)
{
    DestroyDynamicPickup(HouseInfo[houseid][hPickup]);
	DestroyDynamic3DTextLabel(HouseInfo[houseid][hTextInfo]);
	DestroyDynamicMapIcon(HouseInfo[houseid][hMapIcon]);
	new o = HouseInfo[houseid][hOwned];
	new r = HouseInfo[houseid][hRentable];
	new s = HouseInfo[houseid][hSellPrice];
	new c = 0;
	for(new i = 1; i <= TotalClans; i++) if(ClanInfo[i][cHouseHQ] == houseid) c = i;

	new lString[128];
	format(gString, sizeof(gString), "{FFCC99}House ID %d\n", houseid);

    format(lString, sizeof(lString), "{FFCC99}(Casa de vanzare\n)");
    if(!o || s) strins(gString, lString, strlen(gString));
    format(lString, sizeof(lString), "{FFCC99}(Pret de cumparare $%s\n)", FormatNumber(HouseInfo[houseid][hValue]));
    if(!o) strins(gString, lString, strlen(gString));
    format(lString, sizeof(lString), "{FFCC99}(Pret de cumparare $%s\n)", FormatNumber(HouseInfo[houseid][hSellPrice]));
    if(s) strins(gString, lString, strlen(gString));
    format(lString, sizeof(lString), "{FFCC99}(Propietar %s\n)", HouseInfo[houseid][hOwner]);
    if(o) strins(gString, lString, strlen(gString));
    format(lString, sizeof(lString), "{FFCC99}(Clan HQ: {FFFFFF}%s\n)", ClanInfo[c][cName]);
    if(o&&c) strins(gString, lString, strlen(gString));
    format(lString, sizeof(lString), "{FFCC99}(Trebuie sa ai level %d minim\n)", HouseInfo[houseid][hLevel]);
    strins(gString, lString, strlen(gString));
    format(lString, sizeof(lString), "{FFCC99}(Pretul de inchiriere este %s$\n)", FormatNumber(HouseInfo[houseid][hRent]));
    if(o&&r) strins(gString, lString, strlen(gString));
    format(lString, sizeof(lString), "{FFCC99}(To rent a room type /rentroom.\n)");
    if(o&&r) strins(gString, lString, strlen(gString));
    format(lString, sizeof(lString), "{FFCC99}(Tasteaza /buyhouse pentru cumparare.)");
    if(!o || s) strins(gString, lString, strlen(gString));

	if(!o) HouseInfo[houseid][hPickup] = CreateDynamicPickup(1273, 1, HouseInfo[houseid][hEntranceX], HouseInfo[houseid][hEntranceY], HouseInfo[houseid][hEntranceZ], -1, -1, -1, 15.0);
	if(!o) HouseInfo[houseid][hMapIcon] = CreateDynamicMapIcon(HouseInfo[houseid][hEntranceX], HouseInfo[houseid][hEntranceY], HouseInfo[houseid][hEntranceZ], 31, -1, -1, -1, -1, 30.0);
	if(o) HouseInfo[houseid][hPickup] = CreateDynamicPickup(1239, 1, HouseInfo[houseid][hEntranceX], HouseInfo[houseid][hEntranceY], HouseInfo[houseid][hEntranceZ], -1, -1, -1, 15.0);
	if(o) HouseInfo[houseid][hMapIcon] = CreateDynamicMapIcon(HouseInfo[houseid][hEntranceX], HouseInfo[houseid][hEntranceY], HouseInfo[houseid][hEntranceZ], 32, -1, -1, -1, -1, 30.0);

	HouseInfo[houseid][hTextInfo] = CreateDynamic3DTextLabel(gString,0x0E9107FF,HouseInfo[houseid][hEntranceX], HouseInfo[houseid][hEntranceY], HouseInfo[houseid][hEntranceZ]+0.5,15, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 15.0);
	return 1;
}
  
                                  
                                  function LoadHouses()
{
	new rows, fields;
	cache_get_data(rows, fields, handle);

	if(rows)
	{
		new tmp[128];
		new id = 0;
		for(new i = 0; i < rows; i++)
		{
			id++;
			cache_get_field_content(i, "EntranceX", tmp);			HouseInfo[id][hEntranceX] = floatstr(tmp);
			cache_get_field_content(i, "EntranceY", tmp);			HouseInfo[id][hEntranceY] = floatstr(tmp);
			cache_get_field_content(i, "EntranceZ", tmp);			HouseInfo[id][hEntranceZ] = floatstr(tmp);
			cache_get_field_content(i, "ExitX", tmp);				HouseInfo[id][hExitX] = floatstr(tmp);
			cache_get_field_content(i, "ExitY", tmp);				HouseInfo[id][hExitY] = floatstr(tmp);
			cache_get_field_content(i, "ExitZ", tmp);				HouseInfo[id][hExitZ] = floatstr(tmp);
			cache_get_field_content(i, "Owner", tmp);				strmid(HouseInfo[id][hOwner], tmp, 0, MAX_PLAYER_NAME, MAX_PLAYER_NAME);
			cache_get_field_content(i, "Value", tmp);				HouseInfo[id][hValue] = strval(tmp);
			cache_get_field_content(i, "Interior", tmp);			HouseInfo[id][hInt] = strval(tmp);
			cache_get_field_content(i, "Lock", tmp);				HouseInfo[id][hLock] = strval(tmp);
			cache_get_field_content(i, "Owned", tmp);				HouseInfo[id][hOwned] = strval(tmp);
			cache_get_field_content(i, "Rent", tmp);				HouseInfo[id][hRent] = strval(tmp);
			cache_get_field_content(i, "Rentable", tmp);			HouseInfo[id][hRentable] = strval(tmp);
			cache_get_field_content(i, "Safe", tmp);				HouseInfo[id][hSafe] = strval(tmp);
			cache_get_field_content(i, "Level", tmp);				HouseInfo[id][hLevel] = strval(tmp);
			cache_get_field_content(i, "World", tmp);				HouseInfo[id][hWorld] = strval(tmp);
			cache_get_field_content(i, "SellPrice", tmp);			HouseInfo[id][hSellPrice] = strval(tmp);

			Total_House_Created ++;
			new o = HouseInfo[id][hOwned];
			new r = HouseInfo[id][hRentable];

			new lString[128];
		    format(gString, sizeof(gString), "{FFCC99}House ID %d\n",id);

		    format(lString, sizeof(lString), "{FFCC99}Casa de vanzare\n");
		    if(!o) strins(gString, lString, strlen(gString));
		    format(lString, sizeof(lString), "{FFCC99}(Pret de cumparare$%s\n)", FormatNumber(HouseInfo[id][hValue]));
		    if(!o) strins(gString, lString, strlen(gString));
		    format(lString, sizeof(lString), "{FFCC99}(Propietar %s\n)", HouseInfo[id][hOwner]);
		    if(o) strins(gString, lString, strlen(gString));
		    format(lString, sizeof(lString), "{FFCC99}(Trebuie sa ai level %d minim\n)", HouseInfo[id][hLevel]);
		    strins(gString, lString, strlen(gString));
		    format(lString, sizeof(lString), "{FFCC99}(Pretul de inchiriere este %s$\n)", FormatNumber(HouseInfo[id][hRent]));
		    if(o&&r) strins(gString, lString, strlen(gString));
		    format(lString, sizeof(lString), "{FFCC99}(Tasteaza /rentroom. pentru inchiriere.)");
		    if(o&&r) strins(gString, lString, strlen(gString));
		    format(lString, sizeof(lString), "{FFCC99}(Tasteaza /buyhouse pentru cumparare.)");
		    if(!o) strins(gString, lString, strlen(gString));

		  /*

			if(!o) HouseInfo[id][hPickup] = CreateDynamicPickup(1273, 1, HouseInfo[id][hEntranceX], HouseInfo[id][hEntranceY], HouseInfo[id][hEntranceZ], -1, -1, -1, 15.0);
			if(!o) HouseInfo[id][hMapIcon] = CreateDynamicMapIcon(HouseInfo[id][hEntranceX], HouseInfo[id][hEntranceY], HouseInfo[id][hEntranceZ], 31, -1, -1, -1, -1, 30.0);
			if(o) HouseInfo[id][hPickup] = CreateDynamicPickup(1239, 1, HouseInfo[id][hEntranceX], HouseInfo[id][hEntranceY], HouseInfo[id][hEntranceZ], -1, -1, -1, 15.0);
			if(o) HouseInfo[id][hMapIcon] = CreateDynamicMapIcon(HouseInfo[id][hEntranceX], HouseInfo[id][hEntranceY], HouseInfo[id][hEntranceZ], 32, -1, -1, -1, -1, 30.0);

			HouseInfo[id][hTextInfo] = CreateDynamic3DTextLabel(gString,0x0E9107FF,HouseInfo[id][hEntranceX], HouseInfo[id][hEntranceY], HouseInfo[id][hEntranceZ]+0.5,15, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 15.0);
		}
	}
	return 1;
}


Imagini / Video (optional):http://imgur.com/OCT2C2m
Ati incercat sa rezolvati singur?:

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Si ce este in neregula in poza?

Acum am observat, daca te referi la paranteze, modifca astea

(To rent a room type /rentroom.\n)

din aia modifici asa

(To rent a room type /rentroom.)\n

Adica \n trebuie sa fie dupa paranteza inchisa   tu aveai asa

\n) trebuie \n)

Edited by Mister

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
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.