Gar House Problem ... EMERGENCY !
#1

Hey guys I am sure that here are some scripters ... So I need some help ...
I put my house system on my server (GarHouseSystem) and as i see there is command /createhouse ... so I did create a house and there comes one Checkpoint as place where the house is created ... When i go in the CP (Check Point ) dialog comes out and says : WOULD YOU LIKE TO BUY THIS HOUSE FOR THIS PRICE ? ... and there are also 2 buttons : Buy and Close .... And I prees on Buy ... but nothing moves/works/changes ... PLEASE HELP ME !
Reply
#2

make sure that OnDialogResponse callbacks in all ur filterscripts return 0
and check your OndialogResponse if it's correct and there is no fake callbacks
Reply
#3

Quote:
Originally Posted by MCZOFT
Посмотреть сообщение
make sure that OnDialogResponse callbacks in all ur filterscripts return 0
and check your OndialogResponse if it's correct and there is no fake callbacks
Well What do you think ... i didn't fully understand ?

Код:
	if(dialogid == HOUSEMENU+4)
	{
		if(response)
		{
		    new hname[MAX_PLAYER_NAME+9];
			if(GetOwnedHouses(playerid) >= MAX_HOUSES_OWNED) { ShowInfoBox(playerid, INFORMATION_HEADER, "You Already Own %d House%s. Sell One Of Your Others Before Buying A New.", MAX_HOUSES_OWNED, AddS(MAX_HOUSES_OWNED)); return 0; }
			if(strcmp(GetHouseOwner(GetPVarInt(playerid, "LastHouseCP")), pNick(playerid), CASE_SENSETIVE) && strcmp(GetHouseOwner(h), INVALID_HOWNER_NAME, CASE_SENSETIVE)) return SendClientMessage(playerid, COLOUR_SYSTEM, E_H_ALREADY_OWNED);
			if(GetHouseValue(h) > GetPlayerMoney(playerid)) { ShowInfoBox(playerid, INFORMATION_HEADER, "You Can Not Afford To Buy This House.\nHouse Value: $%d.\nYou Have: $%d.\nYou Need: $%d.", GetHouseValue(h), GetPlayerMoney(playerid), (GetHouseValue(h) - GetPlayerMoney(playerid))); return 0; }
			else
			{
			    format(hname, sizeof(hname), "%s's House", pNick(playerid));
				GivePlayerMoney(playerid, -GetHouseValue(h));
				dini_Set(file, "HouseOwner", pNick(playerid));
				dini_Set(file, "HousePassword", "INVALID_HOUSE_PASSWORD");
				dini_Set(file, "HouseName", hname);
				dini_IntSet(file, "HouseStorage", 0);
				ShowInfoBox(playerid, INFORMATION_HEADER, I_BUY_HOUSE, GetHouseValue(h));
				Loop(h2, MAX_HOUSES)
				{
					if(IsHouseInRangeOfHouse(h, h2, RANGE_BETWEEN_HOUSES) && h2 != h)
					{
					    format(file2, sizeof(file2), FILEPATH, h2);
						dini_IntSet(file2, "HouseValue", (dini_Int(file2, "HouseValue") + ReturnProcent(GetHouseValue(h2), HOUSE_SELLING_PROCENT2)));
                        UpdateHouseText(h2);
					}
				}
				#if defined GH_USE_MAPICONS
					DestroyDynamicMapIcon(HouseMIcon[h]);
					HouseMIcon[h] = CreateDynamicMapIcon(dini_Float(file, "CPOutX"), dini_Float(file, "CPOutY"), dini_Float(file, "CPOutZ"), 32, -1, dini_Int(file, "SpawnWorld"), dini_Int(file, "SpawnInterior"), -1, MICON_VD);
				#endif
				UpdateHouseText(h);
                #if defined GH_DEBUGGING
  					printf(DEBUG_ODR1, pNick(playerid), playerid, h, GetHouseValue(h));
	    		#endif
			}
		}
		return 1;
	}
Do You mean i have to change on the end of all dialogs from 1 to 0 ?
Reply
#4

https://sampwiki.blast.hk/wiki/OnDialogResponse
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)