Jump to content
  • 0

Definirea symbolurilor houses si HouseInfo in vortex


KingZone

Question

Problema intalnita (descriere):Problema la definirea symbolurilor houses si HouseInfo in vortex
Ero(area / rile) / warning-(ul / urile): error 017: undefined symbol "HouseInfo",error 017: undefined symbol "houses
Liniile de cod / sursa / script-ul(obligatoriu):

CMD:aedit(playerid, params[], help)
{
	if(playerVariables[playerid][pAdminLevel] < 6) return SendClientMessage(playerid, COLOR_WHITE, AdminOnly);
	new name[64],amount,string[512];
	if(sscanf(params, "s[64]i", name, amount))
	{
		SendUsage(playerid,"/aedit <name> <amount>");
		SendUsage(playerid,"Available names: Level, Price, Funds, Products");
	}
	else
	{
		for(new i = 1; i <= houses; i++)
		{
			if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
			{
				format(string, sizeof(string), "House: %d", i);
				SendClientMessage(playerid, COLOR_YELLOW2, string);
				if(amount > 0)
				{
				    if(strcmp(name,"level",true) == 0)
				    {
						HouseInfo[i][hLevel] = amount;
						new str2[512];
						mysql_format(SQL, str2,512,"UPDATE `houses` SET `Level`='%d' WHERE `ID`='%d'",HouseInfo[i][hLevel],HouseInfo[i][hID]);
						mysql_tquery(SQL, str2, "", "");
						OnPropTextdrawUpdate(1, i);
					}
					else if(strcmp(name,"price",true) == 0)
				    {
						HouseInfo[i][hValue] = amount;
						new str2[512];
						mysql_format(SQL, str2,512,"UPDATE `houses` SET `Value`='%d' WHERE `ID`='%d'",HouseInfo[i][hValue],HouseInfo[i][hID]);
						mysql_tquery(SQL, str2, "", "");
						OnPropTextdrawUpdate(1, i);
					}
				}
			}
		}
		for(new i = 1; i <= bizzs; i++)
		{
			if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
			{
				format(string, sizeof(string), "Biz: %d", i);
				SendClientMessage(playerid, COLOR_YELLOW2, string);
				if(amount > 0)
				{
				    if(strcmp(name,"level",true) == 0)
				    {
						BizzInfo[i][bLevelNeeded] = amount;
						new Query[128];
						mysql_format(SQL, Query,128,"UPDATE `bizz` SET `LevelNeeded`='%d' WHERE `ID`='%d'",BizzInfo[i][bLevelNeeded],BizzInfo[i][bID]);
						mysql_tquery(SQL, Query, "", "");
						OnPropTextdrawUpdate(2, i);
					}
					else if(strcmp(name,"price",true) == 0)
				    {
						BizzInfo[i][bBuyPrice] = amount;
						new Query[128];
						mysql_format(SQL, Query,128,"UPDATE `bizz` SET `BuyPrice`='%d' WHERE `ID`='%d'",BizzInfo[i][bBuyPrice],BizzInfo[i][bID]);
						mysql_tquery(SQL, Query, "", "");
						OnPropTextdrawUpdate(2, i);
					}
					else if(strcmp(name,"funds",true) == 0)
				    {
						BizzInfo[i][bTill] = amount;
						new Query[128];
						mysql_format(SQL, Query,128,"UPDATE `bizz` SET `Till`='%d' WHERE `ID`='%d'",BizzInfo[i][bTill],BizzInfo[i][bID]);
						mysql_tquery(SQL, Query, "", "");
						OnPropTextdrawUpdate(2, i);
					}
					else if(strcmp(name,"products",true) == 0)
				    {
						BizzInfo[i][bProducts] = amount;
						new Query[128];
						mysql_format(SQL, Query,128,"UPDATE `bizz` SET `Products`='%d' WHERE `ID`='%d'",BizzInfo[i][bProducts],BizzInfo[i][bID]);
						mysql_tquery(SQL, Query, "", "");
						OnPropTextdrawUpdate(2, i);
					}
				}
			}
		}
		for(new i = 1; i <= sbizzs; i++)
		{
			if (PlayerToPoint(3, playerid,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
			{
				format(string, sizeof(string), "SBiz: %d", i);
				SendClientMessage(playerid, COLOR_YELLOW2, string);
				if(amount > 0)
				{
				    if(strcmp(name,"level",true) == 0)
				    {
						SBizzInfo[i][sbLevelNeeded] = amount;
						new
							Query [ 256 ] ;
						mysql_format(SQL, Query,256,"UPDATE `sbizz` SET `LevelNeeded`='%d' WHERE `ID`='%d'",SBizzInfo[i][sbLevelNeeded],SBizzInfo[i][sbID]);
						mysql_tquery(SQL, Query, "", "");
						OnPropTextdrawUpdate(3, i);
					}
					else if(strcmp(name,"price",true) == 0)
				    {
						SBizzInfo[i][sbBuyPrice] = amount;
						new
							Query [ 256 ] ;
						mysql_format(SQL, Query,256,"UPDATE `sbizz` SET `BuyPrice`='%d' WHERE `ID`='%d'",SBizzInfo[i][sbBuyPrice],SBizzInfo[i][sbID]);
						mysql_tquery(SQL, Query, "", "");
						OnPropTextdrawUpdate(3, i);
					}
					else if(strcmp(name,"funds",true) == 0)
				    {
						SBizzInfo[i][sbTill] = amount;
						new
							Query [ 256 ] ;
						mysql_format(SQL, Query,256,"UPDATE `sbizz` SET `Till`='%d' WHERE `ID`='%d'",SBizzInfo[i][sbTill],SBizzInfo[i][sbID]);
						mysql_tquery(SQL, Query, "", "");
						OnPropTextdrawUpdate(3, i);
					}
					else if(strcmp(name,"products",true) == 0)
				    {
						SBizzInfo[i][sbProducts] = amount;
						new
							Query [ 256 ] ;
						mysql_format(SQL, Query,256,"UPDATE `sbizz` SET `Products`='%d' WHERE `ID`='%d'",SBizzInfo[i][sbProducts],SBizzInfo[i][sbID]);
						mysql_tquery(SQL, Query, "", "");
						OnPropTextdrawUpdate(3, i);
					}
				}
			}
		}
	}
	return 1;
}


Imagini / Video (optional): Am precizat mai sus!
Ati incercat sa rezolvati singur?: Desigur! Am incercat definirea acestora dar nu a mers.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Poi nu ai reusit pentru ca deja sunt definite intr-un fel, probabil , dar nu cu HouseInfo . Cauta hInfo , sau ce-ti vine prin minte legat de sistemul de case ... noi cu ce te putem ajuta in cautarea aceasta ?

 

Daca am inteles gresit, te rog sa mai explici o data ...

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.