House exterior dialog
#1

Hello, I made a dialog system that if you choose to place a exterior it gives you a dialog to choose what type of interior you want, Small,Medium,Large it brings you to a random coordinate for the interiors.
But when I type /houseedit exterior [houseid] it dont showing the dialog so does anyone know what i need to change ?

Код:
	else if(strcmp(choice, "exterior", true) == 0)
	{
	    new Float: Pos[3];
		GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
		format(string, sizeof(string), "%s has edited HouseID %d's Exterior. (Before:  %f, %f, %f | After: %f, %f, %f)", GetPlayerNameEx(playerid), houseid,  HouseInfo[houseid][hExteriorX], HouseInfo[houseid][hExteriorY], HouseInfo[houseid][hExteriorZ], Pos[0], Pos[1], Pos[2]);
		Log("logs/hedit.log", string);
		GetPlayerPos(playerid, HouseInfo[houseid][hExteriorX], HouseInfo[houseid][hExteriorY], HouseInfo[houseid][hExteriorZ]);
		GetPlayerFacingAngle(playerid, HouseInfo[houseid][hExteriorA]);
		HouseInfo[houseid][hExtIW] = GetPlayerInterior(playerid);
		HouseInfo[houseid][hExtVW] = GetPlayerVirtualWorld(playerid);
		SendClientMessageEx( playerid, COLOR_WHITE, "You have changed the exterior!" );
		SetPVarInt(playerid, "HOUSECLASS", houseid);
		ShowPlayerDialog(playerid, DIALOG_HOUSECLASS, DIALOG_STYLE_LIST, "House Class Selector","Small\nMedium\nLarge", "Select", "Cancel");
		SaveHouse(houseid);
		ReloadHousePickup(houseid);
		return 1;
	}
DIALOG
Код:
if(dialogid == DIALOG_HOUSECLASS)
	{
	    if(response == 1)
		{
            new houseid = GetPVarInt(playerid, "HOUSECLASS");
			switch(listitem)
			{
			    case 0: //small house
			    {
			        new rand = random(sizeof(HouseInteriorSmall));
			        
			        HouseInfo[houseid][hInteriorX] = HouseInteriorSmall[rand][0];
					HouseInfo[houseid][hInteriorY] = HouseInteriorSmall[rand][1];
					HouseInfo[houseid][hInteriorZ] = HouseInteriorSmall[rand][2];
					HouseInfo[houseid][hIntVW] = houseid+6000;
					HouseInfo[houseid][hIntIW] = HouseSmall[rand][0];
					SendClientMessageEx(playerid, COLOR_WHITE, "You have set the house interior to a small interior");
				}
				case 1: //medium house
			    {
			        new rand = random(sizeof(HouseInteriorMedium));

			        HouseInfo[houseid][hInteriorX] = HouseInteriorMedium[rand][0];
					HouseInfo[houseid][hInteriorY] = HouseInteriorMedium[rand][1];
					HouseInfo[houseid][hInteriorZ] = HouseInteriorMedium[rand][2];
					HouseInfo[houseid][hIntVW] = houseid+6000;
					HouseInfo[houseid][hIntIW] = HouseMedium[rand][0];
					SendClientMessageEx(playerid, COLOR_WHITE, "You have set the house interior to a  medium interior");
				}
				case 2: //large house
			    {
			        new rand = random(sizeof(HouseInteriorLarge));

			        HouseInfo[houseid][hInteriorX] = HouseInteriorLarge[rand][0];
					HouseInfo[houseid][hInteriorY] = HouseInteriorLarge[rand][1];
					HouseInfo[houseid][hInteriorZ] = HouseInteriorLarge[rand][2];
					HouseInfo[houseid][hIntVW] = houseid+6000;
					HouseInfo[houseid][hIntIW] = HouseLarge[rand][0];
					SendClientMessageEx(playerid, COLOR_WHITE, "You have set the house interior to a large interior");
				}
			}
			SaveHouse(houseid);
			DeletePVar(playerid, "HOUSECLASS");
			return 1;
		}
		else
		{
		    new houseid = GetPVarInt(playerid, "HOUSECLASS"),
			rand = random(sizeof(HouseInteriorSmall));

			HouseInfo[houseid][hInteriorX] = HouseInteriorSmall[rand][0];
			HouseInfo[houseid][hInteriorY] = HouseInteriorSmall[rand][1];
			HouseInfo[houseid][hInteriorZ] = HouseInteriorSmall[rand][2];
			HouseInfo[houseid][hIntVW] = houseid+520;
			HouseInfo[houseid][hIntIW] = HouseSmall[rand][0];
			SendClientMessageEx(playerid, COLOR_WHITE, "You have set the house interior to a medium interior");
			SaveHouse(houseid);
			DeletePVar(playerid, "HOUSECLASS");
			return 1;
		}
	}
VARIABLES
Код:
new Float:HouseInteriorSmall[1][3] = {
{244.411987,305.032989,999.148437}
};

new HouseSmall[1][1] = {
{2324.419921,-1145.568359,1050.710083}
};

new Float:HouseInteriorMedium[1][3] = {
{2496.049804,-1695.238159,1014.742187}
};

new HouseMedium[1][1] = {
{3}
};

new Float:HouseInteriorLarge[1][3] = {
{2324.419921,-1145.568359,1050.710083}
};

new HouseLarge[1][1] = {
{2324.419921,-1145.568359,1050.710083}
};
Thanks in advance.
Reply


Messages In This Thread
House exterior dialog - by IndependentGaming - 11.02.2015, 21:47
Re: House exterior dialog - by Lordzy - 12.02.2015, 01:58
Re: House exterior dialog - by IndependentGaming - 12.02.2015, 11:48
Re: House exterior dialog - by IndependentGaming - 12.02.2015, 15:01

Forum Jump:


Users browsing this thread: 1 Guest(s)