[Ajuda] FS casas dinamicas
#1

Estou com um problema com este FS aqui https://sampforum.blast.hk/showthread.php?tid=535972
E com os outros, da o mesmo problema...
Ele nгo da problema algum na hora de compilar, e nem de iniciar o servidor, mas quando entro no servidor, as minhas dialogs nгo funcionam mais, apenas o do fs /createhouse, e mesmo assim as casas nгo criam.
Eu nгo uso nenhum FS, alguem tem alguma ideia do que pode causar este conflito? Se uma caixa de menu estб substituindo alguma do meu gamemode?
O gamemode que eu uso й o Brasil Mundo Online
Reply
#2

deve ser o id do dialog
Reply
#3

Quote:
Originally Posted by PietroMarca
Посмотреть сообщение
Estou com um problema com este FS aqui https://sampforum.blast.hk/showthread.php?tid=535972
E com os outros, da o mesmo problema...
Ele nгo da problema algum na hora de compilar, e nem de iniciar o servidor, mas quando entro no servidor, as minhas dialogs nгo funcionam mais, apenas o do fs /createhouse, e mesmo assim as casas nгo criam.
Eu nгo uso nenhum FS, alguem tem alguma ideia do que pode causar este conflito? Se uma caixa de menu estб substituindo alguma do meu gamemode?
O gamemode que eu uso й o Brasil Mundo Online
Teste no GM Grandlarceny e veja se o bug irб persistir. Se persistir, o problema й no FS e nгo conflito com seu GM
Reply
#4

Quote:
Originally Posted by Eddye
Посмотреть сообщение
Teste no GM Grandlarceny e veja se o bug irб persistir. Se persistir, o problema й no FS e nгo conflito com seu GM
Testei no GrandLarceny e funcionou! Pode ser o que o Marllun falou sobre as dialogs, alguem sabe como resolver?
Reply
#5

Altere esses valores...

Код:
//House system Dialogs
#define HouseCreate 17
#define HouseFurniture 20
#define HouseBuy 45
#define TeleportMenu 12
#define BlankTeleport 53
#define INTERIORMENU 1337
Reply
#6

Para...

PHP код:
#define HouseCreate 25000
#define HouseFurniture 25001
#define HouseBuy 25002
#define TeleportMenu 25003
#define BlankTeleport 25004
#define INTERIORMENU 25005 
Reply
#7

Retorne 0 no final da OnDialogResponse (return 0) e coloque o filterscript em primeiro lugar no server.cfg.
Reply
#8

Desbugou as dialogs! Mas quando eu aperto pra criar a casa, nada acontece, nao aparece icone nem nada...
O mesmo acontece com o fs de grafite https://sampforum.blast.hk/showthread.php?tid=499850
Quando clica em criar, nгo acontece nada. Jб puis as scriptfiles certinho.
Код:
//Created by Jueix, *******.com/user/Jueix

#define FILTERSCRIPT

#include <a_samp>
#include <zcmd>
#include <dudb>
#include <mSelection>
#include <Foreach>
#include <sscanf2>
#include <filesystem>
#include <streamer>

//COLOR DEFINES
#define COLOR_YELLOW 	0xD8D8D8FF
#define COLOR_FADE1 	0xE6E6E6E6
#define COLOR_FADE2 	0xC8C8C8C8
#define COLOR_FADE3 	0xAAAAAAAA
#define COLOR_FADE4 	0x8C8C8C8C
#define COLOR_FADE5 	0x6E6E6E6E
#define COLOR_FADE 		0xC8C8C8C8
#define COLOR_WHITE 	0xFFFFFFAA
#define COLOR_GRAD2 	0xBFC0C2FF
#define COLOR_DARKRED 	0x8B0000AA
#define COLOR_RED 		0xFF0000AA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_GREY 		0xAFAFAFAA
#define COLOR_PINK 		0xDC00DDAA
#define COLOR_BLUE 		0x0259EAAA
#define COLOR_GREEN 	0x00A800AA
#define COLOR_ORANGE 	0xFF8000AA
#define COLOR_CYAN 		0xFF8080AA
#define COLOR_WHITE 	0xFFFFFFAA
#define COLOR_DARKBLUE 	0x0000A0AA
#define COLOR_BLACK 	0x000000AA
#define COLOR_DARKGOLD 	0x808000AA
#define COLOR_PURPLE    0xC2A2DAAA
#define COLOR_BROWN 	0x804000AA
#define COLOR_BLACK2 	0x000000ff
#define COLOR_LIGHTRED 0xFF6347AA
#define WHITE             0xFFFFFFFF
#define PURPLE            0xC2A2DAFF
#define BLUE              0x0000FFFF
#define RED               0xFF0000FF
#define YELLOW            0xFFFF00FF
#define GREEN             0x33AA33FF
#define LIGHTBLUE         0x33CCFFFF
#define LIGHTRED          0xFF6347FF
#define DARKRED           0xAA3333FF
#define GREY              0xAFAFAFFF
#define ORANGE            0xFFA100FF
#define YELLOW2           0xF5DEB3FF

//House system Dialogs
#define HouseCreate 25000 
#define HouseFurniture 25001 
#define HouseBuy 25002 
#define TeleportMenu 25003 
#define BlankTeleport 25004 
#define INTERIORMENU 25005  

//House system
#define MAX_HOUSES 100
#define MAX_FURNITURE 60

new PlayerEditSlot[MAX_PLAYERS];
new HPrice[MAX_PLAYERS];
new HRentPrice[MAX_PLAYERS];
new Float:HEntryPoint[MAX_PLAYERS][3];
new Float:HIntPoint[MAX_PLAYERS][3];
new HInt[MAX_PLAYERS];

new PlayerAtHouse[MAX_PLAYERS];

enum hInfo
{
	Owned,
	OwnerName[124],
	Rented,
	hType,
	RenterName[124],
	hWeed,
	Float:hArmour,
	hGuns[8],
	hGunsAmmo[8],
	hMoney,
	hPrice,
	hRentPrice,
	hLocked,
	//Garage
	Float:GaragePos[3],
	Float:GarageIntPos[3],
	gCars[3],
	gCarpos[3],
	gCarpos2[3],
	gCarpos3[3],
	Float:hDoorPos[3],
	Float:hDoorRot[2],
	hDoorID,
	DoorOpen,
	gInt,
	gVw,
	gLocked,
	//Furniture
	hInt,
	hVw,
	Float:HouseEnterPos[3],
	Float:HouseIntPos[3],
	ObjectID[60],
	Float:ObjectPosX[60],
	Float:ObjectPosZ[60],
	Float:ObjectPosY[60],
	Float:ObjectPosRX[60],
	Float:ObjectPosRY[60],
	Float:ObjectPosRZ[60],
	ObjectVW[60],
	ObjectInt[60]
}
new HouseInfo[MAX_HOUSES][hInfo];

new Text3D:House3D[MAX_HOUSES];

new FurnObject[MAX_PLAYERS];
new FurnID[MAX_PLAYERS];
new HouseObject[MAX_HOUSES][MAX_FURNITURE];

//furniture catalog
new furnmenu = mS_INVALID_LISTID;
new walls = mS_INVALID_LISTID;
new doors = mS_INVALID_LISTID;
new chairs = mS_INVALID_LISTID;
new tables = mS_INVALID_LISTID;
new fitness = mS_INVALID_LISTID;
new lights = mS_INVALID_LISTID;
new eletronic = mS_INVALID_LISTID;
new bathroom = mS_INVALID_LISTID;
new kitchen = mS_INVALID_LISTID;
new beds = mS_INVALID_LISTID;

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Jueixs House System Loaded, Thanks for using :)");
	print("--------------------------------------\n");
	LoadHouses();
	furnmenu = LoadModelSelectionMenu("furnmenu.txt");
	doors = LoadModelSelectionMenu("doors.txt");
	walls = LoadModelSelectionMenu("walls.txt");
	bathroom = LoadModelSelectionMenu("bathroom.txt");
	beds = LoadModelSelectionMenu("beds.txt");
	chairs = LoadModelSelectionMenu("chairs.txt");
	eletronic = LoadModelSelectionMenu("eletronics.txt");
	fitness = LoadModelSelectionMenu("fitness.txt");
	kitchen = LoadModelSelectionMenu("kitchen.txt");
	lights = LoadModelSelectionMenu("lights.txt");
	tables = LoadModelSelectionMenu("tables.txt");
	//Blank Ints
	CreateObject(14750, 1392.70459, -900.15710, 0.13318,   0.00000, 0.00000, 0.00000);
	CreateObject(14754, 1406.81152, -847.42218, -4.76561,   0.00000, 0.00000, 0.00000);
	CreateObject(14758, 1476.41833, -824.14056, -4.90402,   0.00000, 0.00000, 0.00000);
	//Blank Interiors for houses
	CreateObject(8231, 114.23020, -35.13149, -17.46767,   0.00000, 0.00000, 0.00000);
	CreateObject(19355, 120.77584, -26.52251, -18.55875,   0.00000, 0.00000, 89.59088);
	CreateObject(19355, 117.56313, -26.49916, -18.55875,   0.00000, 0.00000, 89.59088);
	CreateObject(1522, 115.45912, -26.56390, -19.31681,   0.00000, 0.00000, 0.00000);
	CreateObject(14865, 168.11037, -43.20534, -15.88087,   0.00000, 0.00000, 0.00000);
	CreateObject(14859, 147.34729, -92.70280, -14.77553,   0.00000, 0.00000, 0.00000);
	CreateObject(14708, 69.49778, -108.40356, -18.98319,   0.00000, 0.00000, 0.00000);
	CreateObject(14707, 100.94394, -142.53949, -16.75093,   0.00000, 0.00000, 0.00000);
	// house terrain to build from strach even the walls =p
	CreateObject(12814, -270.39493, 1617.81628, -44.77485,   0.00000, 0.00000, 1.15923);
	CreateObject(12814, -240.50943, 1618.39832, -44.77485,   0.00000, 0.00000, 1.15923);
	return 1;
}

public OnPlayerConnect(playerid)
{
    new pstring[128];
    format(pstring, sizeof(pstring), "Houses/Users/%s.ini",PlayerName(playerid));
    if(!DOF2_FileExists(pstring))
	{
	    SetPVarInt(playerid, "HouseKey", 501);
	    DOF2_CreateFile(pstring);
	    DOF2_SetInt(pstring, "House", 501);
   		DOF2_WriteFile();
	}
	if(DOF2_FileExists(pstring))
	{
	   SetPVarInt(playerid, "HouseKey", DOF2_GetInt(pstring, "House"));
	}
	SendClientMessage(playerid, COLOR_ORANGE, "This server is using Jueixs House System made by Jueix.");
	return 1;
}

//Key state change / Buy house / enter house.
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_CTRL_BACK)
	{
    	for(new h = 0; h < sizeof(HouseInfo); h++)
		{
		    if(HouseInfo[h][hType] == 0)
		    {
			    if(IsPlayerInRangeOfPoint(playerid, 3.0,HouseInfo[h][HouseEnterPos][0],HouseInfo[h][HouseEnterPos][1],HouseInfo[h][HouseEnterPos][2]) && HouseInfo[h][Owned] == 0)
			    {
			        if(GetPVarInt(playerid, "HouseKey") < 501) return SendClientMessage(playerid,COLOR_LIGHTRED,"Error: You can only own one house at this time.");
			        new String[124];
			        PlayerAtHouse[playerid] = GetHouseID(playerid);
	    			format(String,sizeof(String),"This house is for sale for $%d.",HouseInfo[h][hPrice]);
			        ShowPlayerDialog(playerid, HouseBuy, DIALOG_STYLE_MSGBOX, "House for sale", String, "Cash", "Close");
			    }
			    if(IsPlayerInRangeOfPoint(playerid, 3.0,HouseInfo[h][HouseEnterPos][0],HouseInfo[h][HouseEnterPos][1],HouseInfo[h][HouseEnterPos][2]) && HouseInfo[h][Owned] == 1 && h == GetPVarInt(playerid,"HouseKey") && HouseInfo[h][hLocked] == 1)
			    {
			        HouseInfo[h][hLocked] = 0;
			        SetPlayerPos(playerid,HouseInfo[h][HouseIntPos][0],HouseInfo[h][HouseIntPos][1],HouseInfo[h][HouseIntPos][2]);
			        SetPlayerInterior(playerid,HouseInfo[h][hInt]);
			        SetPlayerVirtualWorld(playerid,HouseInfo[h][hVw]);
			    }
			    if(IsPlayerInRangeOfPoint(playerid, 3.0,HouseInfo[h][HouseEnterPos][0],HouseInfo[h][HouseEnterPos][1],HouseInfo[h][HouseEnterPos][2]) && HouseInfo[h][Owned] == 1 && HouseInfo[h][hLocked] == 0)
			    {
			        SetPlayerPos(playerid,HouseInfo[h][HouseIntPos][0],HouseInfo[h][HouseIntPos][1],HouseInfo[h][HouseIntPos][2]);
			        SetPlayerInterior(playerid,HouseInfo[h][hInt]);
			        SetPlayerVirtualWorld(playerid,HouseInfo[h][hVw]);
			    }
			    if(IsPlayerInRangeOfPoint(playerid, 3.0,HouseInfo[h][HouseIntPos][0],HouseInfo[h][HouseIntPos][1],HouseInfo[h][HouseIntPos][2]) && GetPlayerVirtualWorld(playerid) == HouseInfo[h][hVw])
			    {
			        SetPlayerPos(playerid,HouseInfo[h][HouseEnterPos][0],HouseInfo[h][HouseEnterPos][1],HouseInfo[h][HouseEnterPos][2]);
			        SetPlayerInterior(playerid,0);
			        SetPlayerVirtualWorld(playerid,0);
			    }
			}
		}
	}
	return 1;
}

//Furniture Dialogs and House Dialogs
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch( dialogid ) //buying house.
 	{
		case HouseBuy:
		{
		    if(!response)
		    {
				//
		    }
		    else {
		        if(GetPlayerMoney(playerid) < HouseInfo[PlayerAtHouse[playerid]][hPrice]) return SendClientMessage(playerid, COLOR_RED, "Error: Not enough money.");
		        new house[256];
		        new pstring[256];
		        new string[256];
		        new sendername[MAX_PLAYER_NAME];
		        format(house, sizeof(house), "Houses/house%i.ini",PlayerAtHouse[playerid]);
				format(pstring, sizeof(pstring), "Houses/Users/%s.ini",PlayerName(playerid));
				DestroyDynamic3DTextLabel(House3D[PlayerAtHouse[playerid]]);
		        SetPVarInt(playerid,"PlayerCash",GetPVarInt(playerid,"PlayerCash")-HouseInfo[PlayerAtHouse[playerid]][hPrice]);
		        format(sendername, sizeof(sendername), "%s", PlayerName(playerid));
		        strmid(HouseInfo[PlayerAtHouse[playerid]][OwnerName], sendername, 0, strlen(sendername), 255);
		        SetPVarInt(playerid, "HouseKey", PlayerAtHouse[playerid]);
		        HouseInfo[PlayerAtHouse[playerid]][Owned] = 1;
		        DOF2_SetString(house, "OwnerName", sendername);
        		DOF2_SetInt(house, "Owned", 1);
        		DOF2_SetInt(pstring, "House", GetPVarInt(playerid,"HouseKey"));
        		DOF2_WriteFile();
        		GivePlayerMoney(playerid,-HouseInfo[PlayerAtHouse[playerid]][hPrice]);
        		format(string, sizeof(string), "House Owned By %s:\n Price: %d\nPress H to enter", HouseInfo[PlayerAtHouse[playerid]][OwnerName], HouseInfo[PlayerAtHouse[playerid]][hPrice]);
        		House3D[PlayerAtHouse[playerid]] = CreateDynamic3DTextLabel(string,0xFFFFFFFF,HouseInfo[PlayerAtHouse[playerid]][HouseEnterPos][0],HouseInfo[PlayerAtHouse[playerid]][HouseEnterPos][1],HouseInfo[PlayerAtHouse[playerid]][HouseEnterPos][2]+0.75, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0, 0, -1, 100.0);
		    }
		}
	}
	//Catalog Dialog ID's
	//creation
	switch(dialogid)
	{
		case HouseCreate:
		{
			if(!response)
			{
				SendClientMessage(playerid, 0x42F3F198, "House Creation ended.");
				return 1;
			}
			switch(listitem)
			{
			    case 0:
				{
					ShowPlayerDialog(playerid,HouseCreate+1, DIALOG_STYLE_INPUT, "House Price", "Enter the price of the house below:", "Ok", "Cancel");
				}
				case 1:
				{
					ShowPlayerDialog(playerid,HouseCreate+2, DIALOG_STYLE_INPUT, "House Rent Price", "Enter the rent price of the house below:", "Ok", "Cancel");
				}
				case 2:
				{
                    GetPlayerPos(playerid,HEntryPoint[playerid][0],HEntryPoint[playerid][1],HEntryPoint[playerid][2]);
					SendClientMessage(playerid,COLOR_ORANGE,"Entry point made and saved");
				}
				case 3:
				{
				    HInt[playerid] = GetPlayerInterior(playerid);
					GetPlayerPos(playerid,HIntPoint[playerid][0],HIntPoint[playerid][1],HIntPoint[playerid][2]);
					SendClientMessage(playerid,COLOR_ORANGE,"Interior point made and saved, Please make sure its near the door.");
				}
				case 4:
				{
				    ShowPlayerDialog(playerid, TeleportMenu, DIALOG_STYLE_LIST, "House Interiors", "Interiors\nBlank Interiors", "Continue", "Cancel");
				}
				case 5:
				{
					new i = GetHouses();
					new string[254];
					new ModelFile[124];
					new XFile[124];
		 			new YFile[124];
		 			new ZFile[124];
					format(string, sizeof(string), "Houses/house%i.ini", GetHouses());
					format(ModelFile,sizeof(ModelFile),"Houses/furnhouse%i.ini",i);
	        		format(XFile,sizeof(XFile),"Houses/furnXhouse%i.ini",i);
	        		format(YFile,sizeof(YFile),"Houses/furnYhouse%i.ini",i);
	        		format(ZFile,sizeof(ZFile),"Houses/furnZhouse%i.ini",i);
	        		DOF2_CreateFile(ModelFile);
			    	DOF2_CreateFile(XFile);
			    	DOF2_CreateFile(YFile);
			    	DOF2_CreateFile(ZFile);
	    			DOF2_CreateFile(string);
					DOF2_SetInt(string, "Owned", 0);
					DOF2_SetInt(string, "Rented", 0);
					DOF2_SetInt(string, "Price", HPrice[playerid]);
					DOF2_SetInt(string, "RentPrice", HRentPrice[playerid]);
					DOF2_SetInt(string, "Weed", 0);
					DOF2_SetInt(string, "Money", 0);
					DOF2_SetInt(string, "Locked", 1);
					DOF2_SetInt(string, "Int", HInt[playerid]);
					DOF2_SetInt(string, "VW", i);
					//Floats
					DOF2_SetFloat(string, "Armour", 0);
					DOF2_SetFloat(string, "X", HEntryPoint[playerid][0]);
					DOF2_SetFloat(string, "Y", HEntryPoint[playerid][1]);
					DOF2_SetFloat(string, "Z", HEntryPoint[playerid][2]);
					DOF2_SetFloat(string, "IX", HIntPoint[playerid][0]);
					DOF2_SetFloat(string, "IY", HIntPoint[playerid][1]);
					DOF2_SetFloat(string, "IZ", HIntPoint[playerid][2]);
					//Strings
	    			DOF2_SetString(string, "OwnerName", "For Sale");
	    			DOF2_SetString(string, "RenterName", "For Rent");
	    			DOF2_WriteFile();
	    			HouseInfo[i][hPrice] = HPrice[playerid];
	    			HouseInfo[i][hRentPrice] = HRentPrice[playerid];
	    		    HouseInfo[i][hInt] = HInt[playerid];
	    		    HouseInfo[i][hVw] = i;
	    		    HouseInfo[i][HouseEnterPos][0] = HEntryPoint[playerid][0];
	    		    HouseInfo[i][HouseEnterPos][1] = HEntryPoint[playerid][1];
	    		    HouseInfo[i][HouseEnterPos][2] = HEntryPoint[playerid][2];
	    		    HouseInfo[i][HouseIntPos][0] = HIntPoint[playerid][0];
	    		    HouseInfo[i][HouseIntPos][1] = HIntPoint[playerid][1];
	    		    HouseInfo[i][HouseIntPos][2] = HIntPoint[playerid][2];
	    		    SetPlayerPos(playerid,HouseInfo[i][HouseEnterPos][0],HouseInfo[i][HouseEnterPos][1],HouseInfo[i][HouseEnterPos][2]);
	    		    SetPlayerInterior(playerid,0);
	    		    SetPlayerVirtualWorld(playerid,0);
	    		    format(string, sizeof(string), "House for sale\nBuy Price:$%d\nRent Price(per payday):$%d\nPress H to enter", HouseInfo[i][hPrice],HouseInfo[i][hRentPrice]);
	    		    House3D[i] = CreateDynamic3DTextLabel(string,0xFFFFFFFF,HouseInfo[i][HouseEnterPos][0],HouseInfo[i][HouseEnterPos][1],HouseInfo[i][HouseEnterPos][2]+0.75, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0, 0, -1, 100.0);
	    			CreateDynamicPickup(1273, 1, HouseInfo[i][HouseEnterPos][0],HouseInfo[i][HouseEnterPos][1],HouseInfo[i][HouseEnterPos][2]);
				}
			}
		}
	}
	switch( dialogid )
 	{
		case HouseCreate+1: // Tutorial Part 1 dialog
		{
		    if(!strlen(inputtext)) return ShowPlayerDialog(playerid,HouseCreate+1, DIALOG_STYLE_INPUT, "House Price", "Enter the price of the house below:", "Ok", "Cancel");
	        if(strlen(inputtext) >= 7) return ShowPlayerDialog(playerid,HouseCreate+1, DIALOG_STYLE_INPUT, "House Price", "Enter the price of the house below:", "Ok", "Cancel");
	        new amount = strval(inputtext);
	        //if(amount <= 1) return ShowPlayerDialog(playerid,HouseCreate+1, DIALOG_STYLE_INPUT, "House Price", "Enter the price of the house below\nPrice must be above 1:", "Ok", "Cancel");
	        if(amount >= 90000000) return ShowPlayerDialog(playerid,HouseCreate+1, DIALOG_STYLE_INPUT, "House Price", "Enter the price of the house below\nPrice must be below 90000000:", "Ok", "Cancel");
	        HPrice[playerid] = amount;
		}
	}
	switch( dialogid )
 	{
		case HouseCreate+2: // Tutorial Part 1 dialog
		{
		    if(!strlen(inputtext)) return ShowPlayerDialog(playerid,HouseCreate+2, DIALOG_STYLE_INPUT, "House Price", "Enter the price of the house below:", "Ok", "Cancel");
	        if(strlen(inputtext) >= 7) return ShowPlayerDialog(playerid,HouseCreate+2, DIALOG_STYLE_INPUT, "House Price", "Enter the price of the house below:", "Ok", "Cancel");
	        new amount = strval(inputtext);
	        if(amount <= 1) return ShowPlayerDialog(playerid,HouseCreate+2, DIALOG_STYLE_INPUT, "House Price", "Enter the price of the house below\nPrice must be above 1:", "Ok", "Cancel");
	        if(amount >= 90000000) return ShowPlayerDialog(playerid,HouseCreate+2, DIALOG_STYLE_INPUT, "House Price", "Enter the price of the house below\nPrice must be below 90000000:", "Ok", "Cancel");
	        HRentPrice[playerid] = amount;
		}
	}
	switch(dialogid)
	{
		case HouseFurniture:
		{
			if(!response)
			{
				SendClientMessage(playerid, 0x42F3F198, "Furniture menu closed.");
				return 1;
			}
			switch(listitem)
			{
			    case 0:
				{
				    ShowPlayerDialog(playerid, 23, DIALOG_STYLE_LIST, "Furniture Slots", "Slot 1\nSlot 2\nSlot 3\nSlot 4\nSlot 5\nSlot 6\nSlot 7\nSlot 8\nSlot 9\nSlot 10\nSlot 11\nSlot 12\nSlot 13\nSlot 14\nSlot 15\nNext", "Continue", "Cancel");
				}
				case 1:
				{
					ShowPlayerDialog(playerid, 27, DIALOG_STYLE_LIST, "Furniture Slots", "Slot 1\nSlot 2\nSlot 3\nSlot 4\nSlot 5\nSlot 6\nSlot 7\nSlot 8\nSlot 9\nSlot 10\nSlot 11\nSlot 12\nSlot 13\nSlot 14\nSlot 15\nNext", "Continue", "Cancel");
				}
				case 2:
				{
					for(new h = 0; h < MAX_FURNITURE;h++)
					{
			    		new ModelFile[124];
			    		new key = GetPVarInt(playerid,"HouseKey");
			    		new String[124];
			    		format(ModelFile,sizeof(ModelFile),"Houses/furnhouse%i.ini",key);
			    		format(String,sizeof(String),"ObjectID%i",h);
	        			HouseInfo[key][ObjectID][h] = 0;
						DOF2_SetInt(ModelFile,String,0);
						DestroyDynamicObject(HouseObject[key][h]);
					}
				}
				case 3:
				{
					SendClientMessage(playerid,COLOR_ORANGE,"Error: Not made yet, Please come back later!");
				}
				case 4:
				{
					SendClientMessage(playerid,COLOR_ORANGE,"Error: Not made yet, Please come back later!");
				}
			}
		}
	}
	//adding objects
	switch(dialogid)
	{
		case 23:
		{
			if(!response)
			{
				SendClientMessage(playerid, 0x42F3F198, "Furniture menu closed.");
				return 1;
			}
			if(listitem < 15)
			{
			    if(HouseInfo[GetPVarInt(playerid, "HouseKey")][ObjectID][listitem] > 0) return SendClientMessage(playerid,COLOR_LIGHTRED,"Error: This object slot is already in use please remove it.");
				PlayerEditSlot[playerid] = listitem;
				ShowModelSelectionMenu(playerid, furnmenu, "Furniture Catalog Index");
			}
			if(listitem == 15)
			{
			    ShowPlayerDialog(playerid, 24, DIALOG_STYLE_LIST, "Furniture Slots", "Slot 16\nSlot 17\nSlot 18\nSlot 19\nSlot 20\nSlot 21\nSlot 22\nSlot 23\nSlot 24\nSlot 25\nSlot 26\nSlot 27\nSlot 28\nSlot 29\nSlot 30\nNext\nBack", "Continue", "Cancel");
			}
		}
	}
	switch(dialogid)
	{
		case 24:
		{
			if(!response)
			{
				SendClientMessage(playerid, 0x42F3F198, "Furniture menu closed.");
				return 1;
			}
			if(listitem < 15)
			{
			    if(HouseInfo[GetPVarInt(playerid, "HouseKey")][ObjectID][listitem+15] > 0) return SendClientMessage(playerid,COLOR_LIGHTRED,"Error: This object slot is already in use please remove it.");
				PlayerEditSlot[playerid] = listitem+15;
				ShowModelSelectionMenu(playerid, furnmenu, "Furniture Catalog Index");
			}
			if(listitem == 15)
			{
  				ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Furniture Slots", "Slot 31\nSlot 32\nSlot 33\nSlot 34\nSlot 35\nSlot 36\nSlot 37\nSlot 38\nSlot 39\nSlot 40\nSlot 41\nSlot 42\nSlot 43\nSlot 44\nSlot 45\nNext\nBack", "Continue", "Cancel");
				//then the same if statement but with 1 instead of 0 to 45 and continue it from there.
			}
			if(listitem == 16)
			{
			    ShowPlayerDialog(playerid, 23, DIALOG_STYLE_LIST, "Furniture Slots", "Slot 1\nSlot 2\nSlot 3\nSlot 4\nSlot 5\nSlot 6\nSlot 7\nSlot 8\nSlot 9\nSlot 10\nSlot 11\nSlot 12\nSlot 13\nSlot 14\nSlot 15\nNext", "Continue", "Cancel");
			}
		}
	}
	switch(dialogid)
	{
		case 25:
		{
			if(!response)
			{
				SendClientMessage(playerid, 0x42F3F198, "Furniture menu closed.");
				return 1;
			}
			if(listitem < 15)
			{
			    if(HouseInfo[GetPVarInt(playerid, "HouseKey")][ObjectID][listitem+30] > 0) return SendClientMessage(playerid,COLOR_LIGHTRED,"Error: This object slot is already in use please remove it.");
				PlayerEditSlot[playerid] = listitem+30;
				ShowModelSelectionMenu(playerid, furnmenu, "Furniture Catalog Index");
			}
			if(listitem == 15)
			{
			    ShowPlayerDialog(playerid, 26, DIALOG_STYLE_LIST, "Furniture Slots", "Slot 46\nSlot 47\nSlot 48\nSlot 49\nSlot 50\nSlot 51\nSlot 52\nSlot 53\nSlot 54\nSlot 55\nSlot 56\nSlot 57\nSlot 58\nSlot 59\nSlot 60\nBack", "Continue", "Cancel");
			}
			if(listitem == 16)
			{
			    ShowPlayerDialog(playerid, 24, DIALOG_STYLE_LIST, "Furniture Slots", "Slot 16\nSlot 17\nSlot 18\nSlot 19\nSlot 20\nSlot 21\nSlot 22\nSlot 23\nSlot 24\nSlot 25\nSlot 26\nSlot 27\nSlot 28\nSlot 29\nSlot 30\nNext\nBack", "Continue", "Cancel");
			}
		}
	}
	switch(dialogid)
	{
		case 26:
		{
			if(!response)
			{
				SendClientMessage(playerid, 0x42F3F198, "Furniture menu closed.");
				return 1;
			}
			if(listitem < 15)
			{
			    if(HouseInfo[GetPVarInt(playerid, "HouseKey")][ObjectID][listitem+45] > 0) return SendClientMessage(playerid,COLOR_LIGHTRED,"Error: This object slot is already in use please remove it.");
				PlayerEditSlot[playerid] = listitem+45;
				ShowModelSelectionMenu(playerid, furnmenu, "Furniture Catalog Index");
			}
			if(listitem == 15)
			{
			    ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Furniture Slots", "Slot 31\nSlot 32\nSlot 33\nSlot 34\nSlot 35\nSlot 36\nSlot 37\nSlot 38\nSlot 39\nSlot 40\nSlot 41\nSlot 42\nSlot 43\nSlot 44\nSlot 45\nNext\nBack", "Continue", "Cancel");
			}
		}
	}
	//removing objects
	switch(dialogid)
	{
		case 27:
		{
			if(!response)
			{
				SendClientMessage(playerid, 0x42F3F198, "Furniture menu closed.");
				return 1;
			}
			if(listitem < 15)
			{
			    if(HouseInfo[GetPVarInt(playerid, "HouseKey")][ObjectID][listitem] == 0) return SendClientMessage(playerid,COLOR_LIGHTRED,"Error: This object slot does not exist yet, please create it.");
				new ModelFile[124];
  				new key = GetPVarInt(playerid,"HouseKey");
    			new String[124];
	    		format(ModelFile,sizeof(ModelFile),"Houses/furnhouse%i.ini",key);
	    		format(String,sizeof(String),"ObjectID%i",listitem);
    			HouseInfo[key][ObjectID][listitem] = 0;
				DOF2_SetInt(ModelFile,String,0);
				DestroyDynamicObject(HouseObject[key][listitem]);
			}
			if(listitem == 15)
			{
			    ShowPlayerDialog(playerid, 28, DIALOG_STYLE_LIST, "Furniture Slots", "Slot 16\nSlot 17\nSlot 18\nSlot 19\nSlot 20\nSlot 21\nSlot 22\nSlot 23\nSlot 24\nSlot 25\nSlot 26\nSlot 27\nSlot 28\nSlot 29\nSlot 30\nNext\nBack", "Continue", "Cancel");
			}
		}
	}
	switch(dialogid)
	{
		case 28:
		{
			if(!response)
			{
				SendClientMessage(playerid, 0x42F3F198, "Furniture menu closed.");
				return 1;
			}
			if(listitem < 15)
			{
			    if(HouseInfo[GetPVarInt(playerid, "HouseKey")][ObjectID][listitem+15] == 0) return SendClientMessage(playerid,COLOR_LIGHTRED,"Error: This object slot does not exist yet, please create it.");
				new ModelFile[124];
  				new key = GetPVarInt(playerid,"HouseKey");
    			new String[124];
	    		format(ModelFile,sizeof(ModelFile),"Houses/furnhouse%i.ini",key);
	    		format(String,sizeof(String),"ObjectID%i",listitem+15);
    			HouseInfo[key][ObjectID][listitem+15] = 0;
				DOF2_SetInt(ModelFile,String,0);
				DestroyDynamicObject(HouseObject[key][listitem+15]);
			}
			if(listitem == 15)
			{
			     ShowPlayerDialog(playerid, 29, DIALOG_STYLE_LIST, "Furniture Slots", "Slot 31\nSlot 32\nSlot 33\nSlot 34\nSlot 35\nSlot 36\nSlot 37\nSlot 38\nSlot 39\nSlot 40\nSlot 41\nSlot 42\nSlot 43\nSlot 44\nSlot 45\nNext\nBack", "Continue", "Cancel");
			}
			if(listitem == 16)
			{
			     ShowPlayerDialog(playerid, 27, DIALOG_STYLE_LIST, "Furniture Slots", "Slot 1\nSlot 2\nSlot 3\nSlot 4\nSlot 5\nSlot 6\nSlot 7\nSlot 8\nSlot 9\nSlot 10\nSlot 11\nSlot 12\nSlot 13\nSlot 14\nSlot 15\nNext", "Continue", "Cancel");
			}
		}
	}
	switch(dialogid)
	{
		case 29:
		{
			if(!response)
			{
				SendClientMessage(playerid, 0x42F3F198, "Furniture menu closed.");
				return 1;
			}
			if(listitem < 15)
			{
			    if(HouseInfo[GetPVarInt(playerid, "HouseKey")][ObjectID][listitem+15] == 0) return SendClientMessage(playerid,COLOR_LIGHTRED,"Error: This object slot does not exist yet, please create it.");
				new ModelFile[124];
  				new key = GetPVarInt(playerid,"HouseKey");
    			new String[124];
	    		format(ModelFile,sizeof(ModelFile),"Houses/furnhouse%i.ini",key);
	    		format(String,sizeof(String),"ObjectID%i",listitem+30);
    			HouseInfo[key][ObjectID][listitem+30] = 0;
				DOF2_SetInt(ModelFile,String,0);
				DestroyDynamicObject(HouseObject[key][listitem+30]);
			}
			if(listitem == 15)
			{
			     ShowPlayerDialog(playerid, 30, DIALOG_STYLE_LIST, "Furniture Slots", "Slot 46\nSlot 47\nSlot 48\nSlot 49\nSlot 50\nSlot 51\nSlot 52\nSlot 53\nSlot 54\nSlot 55\nSlot 56\nSlot 57\nSlot 58\nSlot 59\nSlot 60\nBack", "Continue", "Cancel");
			}
			if(listitem == 16)
			{
			     ShowPlayerDialog(playerid, 28, DIALOG_STYLE_LIST, "Furniture Slots", "Slot 16\nSlot 17\nSlot 18\nSlot 19\nSlot 20\nSlot 21\nSlot 22\nSlot 23\nSlot 24\nSlot 25\nSlot 26\nSlot 27\nSlot 28\nSlot 29\nSlot 30\nNext\nBack", "Continue", "Cancel");
			}
		}
	}
	switch(dialogid)
	{
		case 30:
		{
			if(!response)
			{
				SendClientMessage(playerid, 0x42F3F198, "Furniture menu closed.");
				return 1;
			}
			if(listitem < 15)
			{
			    if(HouseInfo[GetPVarInt(playerid, "HouseKey")][ObjectID][listitem+15] == 0) return SendClientMessage(playerid,COLOR_LIGHTRED,"Error: This object slot does not exist yet, please create it.");
				new ModelFile[124];
  				new key = GetPVarInt(playerid,"HouseKey");
    			new String[124];
	    		format(ModelFile,sizeof(ModelFile),"Houses/furnhouse%i.ini",key);
	    		format(String,sizeof(String),"ObjectID%i",listitem+45);
    			HouseInfo[key][ObjectID][listitem+45] = 0;
				DOF2_SetInt(ModelFile,String,0);
				DestroyDynamicObject(HouseObject[key][listitem+45]);
			}
			if(listitem == 15)
			{
			     ShowPlayerDialog(playerid, 29, DIALOG_STYLE_LIST, "Furniture Slots", "Slot 31\nSlot 32\nSlot 33\nSlot 34\nSlot 35\nSlot 36\nSlot 37\nSlot 38\nSlot 39\nSlot 40\nSlot 41\nSlot 42\nSlot 43\nSlot 44\nSlot 45\nNext\nBack", "Continue", "Cancel");
			}
		}
	}
	//admin teleport menu
	switch(dialogid)
	{
		case TeleportMenu:
		{
          	if(!response)
			{
				SendClientMessage(playerid, 0x42F3F198, "Admin Teleports Closed!");
				return 1;
			}
			switch(listitem)
			{
				case 0:
				{
				    ShowPlayerDialog(playerid, INTERIORMENU, DIALOG_STYLE_LIST, "Interior Categories","24/7's\nAirports\nAmmunations\nHouses\nHouses 2\nMissions\nStadiums\nCasinos\nShops\nGarages\nGirlfriends\nClothing/Barber Store\nResturants/Clubs\nNo Category\nBurglary\nBurglary 2\nGym\nDepartment\nBack", "Select", "Cancel");
				}
				case 1:
				{
				    ShowPlayerDialog(playerid, BlankTeleport, DIALOG_STYLE_LIST, "Blank Interiors", "Blank Motel Room 1\nBlank Motel Room 2\nHouse 1\nHouse 2\nHouse 3\nHouse 4\nHouse 5\nHouse 6\nHouse Terrain", "Go", "Cancel");
				}
			}
		}
	}
	switch(dialogid)
	{
		case BlankTeleport:
		{
          	if(!response)
			{
				SendClientMessage(playerid, 0x42F3F198, "Admin Teleports Closed!");
				return 1;
			}
			switch(listitem)
			{
			    case 0:
				{
					SetPlayerPos(playerid,145.0974,-91.4169,-15.7755);
					SetPlayerInterior(playerid,1000);
					SetPlayerVirtualWorld(playerid, 1000);
				}
				case 1:
				{
				    SetPlayerPos(playerid,164.9469,-43.6670,-16.8809);
				    SetPlayerInterior(playerid,1000);
				    SetPlayerVirtualWorld(playerid, 1000);
				}
				case 2:
				{
				    SetPlayerPos(playerid,116.1681,-27.9442,-18.1634);
				    SetPlayerInterior(playerid,1000);
				    SetPlayerVirtualWorld(playerid, 1000);
				}
				case 3:
				{
				    SetPlayerPos(playerid,88.7531,-155.4494,-20.3392);
				    SetPlayerInterior(playerid,1000);
				    SetPlayerVirtualWorld(playerid, 1000);
				}
				case 4:
				{
				    SetPlayerPos(playerid,68.3126,-116.4629,-19.7437);
				    SetPlayerInterior(playerid,1000);
				    SetPlayerVirtualWorld(playerid, 1000);
				}
				case 5:
				{
				    SetPlayerPos(playerid,1481.0991,-818.6356,-4.8637);
				    SetPlayerInterior(playerid,1000);
				    SetPlayerVirtualWorld(playerid, 1000);
				}
				case 6:
				{
				    SetPlayerPos(playerid,1406.7257,-843.6014,-8.3327);
				    SetPlayerInterior(playerid,1000);
				    SetPlayerVirtualWorld(playerid, 1000);
				}
				case 7:
				{
				    SetPlayerPos(playerid,1390.1416,-906.9144,-4.8304);
				    SetPlayerInterior(playerid,1000);
				    SetPlayerVirtualWorld(playerid, 1000);
				}
				case 8:
				{
				    SetPlayerPos(playerid,-247.3041,1615.9236,-43.7670);
				    SetPlayerInterior(playerid,1000);
				    SetPlayerVirtualWorld(playerid, 1000);
				}
			}
		}
	}
	if(dialogid == INTERIORMENU)
	{
		if(response)
		{
   			if(listitem == 0) // 24/7
   			{
			ShowPlayerDialog(playerid, INTERIORMENU+1, DIALOG_STYLE_LIST, "24/7's", "24/7 Interior 1 \n24/7 Interior 2 \n24/7 Interior 3 \n24/7 Interior 4 \n24/7 Interior 5 \n24/7 Interior 6 \nBack", "Select", "Cancel");
			}
			if(listitem == 1) // Airports
			{
			ShowPlayerDialog(playerid, INTERIORMENU+2, DIALOG_STYLE_LIST, "Airport Interiors", "Francis Ticket Sales Airport \nFrancis Baggage Claim Airport \nAndromada Cargo Hold \nShamal Cabin \nLS Airport Baggage Claim \nInterernational Airport \nAbandoned AC Tower \nBack", "Select", "Cancel");
			}
			if(listitem == 2) // Ammunations
			{
			ShowPlayerDialog(playerid, INTERIORMENU+3, DIALOG_STYLE_LIST, "Ammunation Interiors", "Ammunation 1 \nAmmunation 2 \nAmmunation 3 \nAmmunation 4 \nAmmunation 5 \nBooth Ammunation \nRange Ammunation \nBack", "Select", "Cancel");
   			}
			if(listitem == 3) // Houses
			{
			ShowPlayerDialog(playerid, INTERIORMENU+4, DIALOG_STYLE_LIST, "Houses", "B Dup's Apartment\nB Dup's Crack Palace \nOG Loc's House \nRyder's house \nSweet's house \nMadd Dogg's Mansion \nBig Smoke's Crack Palace \nBack", "Select", "Cancel");
   			}
			if(listitem == 4) // Houses 2
			{
			ShowPlayerDialog(playerid, INTERIORMENU+5, DIALOG_STYLE_LIST, "Houses 2", "Johnson House \nAngel Pine Trailer \nSafe House \nSafe House 2 \nSafe House 3 \nSafe House 4 \nVerdant Bluffs Safehouse \nWillowfield Safehouse \nThe Camel's Toe Safehouse \nBack", "Select", "Cancel");
   			}
			if(listitem == 5) // Missions
			{
			ShowPlayerDialog(playerid, INTERIORMENU+6, DIALOG_STYLE_LIST, "Missions", "Atrium \nBurning Desire Building \nColonel Furhberger \nWelcome Pump \nWu Zi Mu's Apartement \nJizzy's \nDillimore Gas Station \nJefferson Motel \nLiberty City \nSherman Dam \nBack", "Select", "Cancel");
   			}
			if(listitem == 6) // Missions 2
			{
			ShowPlayerDialog(playerid, INTERIORMENU+7, DIALOG_STYLE_LIST, "Stadiums", "RC War Arena \nRacing Stadium \nRacing Stadium 2 \nBloodbowl Stadium \nKickstart Stadium \nBack", "Select", "Cancel");
   			}
			if(listitem == 7) // Casino Interiors
			{
			ShowPlayerDialog(playerid, INTERIORMENU+8, DIALOG_STYLE_LIST, "Casino Interiors", "Caligulas Casino \n4 Dragons Casino \nRedsands Casino \n4 Dragons Managerial Suite \nInside Track Betting \nCaligulas Roof \nRosenberg's Caligulas Office \n4 Dragons Janitors Office \nBack", "Select", "Cancel");
			}
			if(listitem == 8) // Shops
			{
			ShowPlayerDialog(playerid, INTERIORMENU+9, DIALOG_STYLE_LIST, "Shop Interiors", "Tattoo \nBurger Shot \nWell Stacked Pizza \nCluckin' Bell \nRusty Donut's \nZero's RC Shop \nSex Shop \nBack", "Select", "Cancel");
			}
			if(listitem == 9) // Garages
			{
			ShowPlayerDialog(playerid, INTERIORMENU+10, DIALOG_STYLE_LIST, "Mod Shops/Garages","Loco Low Co. \nWheel Arch Angels \nTransfender \nDoherty Garage \nBack", "Select", "Cancel");
   			}
			if(listitem == 10) // Girl Friends
			{
			ShowPlayerDialog(playerid, INTERIORMENU+11, DIALOG_STYLE_LIST, "CJ's Girlfriends Interiors","Denises Bedroom \nHelena's Barn \nBarbara's Love Nest \nKatie's Lovenest \nMichelle's Love Nest \nMillie's Bedroom \nBack", "Select", "Cancel");
   			}
			if(listitem == 11) // Clothing & Barber Store
			{
			ShowPlayerDialog(playerid, INTERIORMENU+12, DIALOG_STYLE_LIST, "Clothing & Barber Store","Barber Shop \nPro-Laps \nVictim \nSubUrban \nReece's Barber Shop \nZip \nDidier Sachs \nBinco \nBarber Shop 2 \nWardrobe \nBack", "Select", "Cancel");
   			}
   			if(listitem == 12) // Resturants & Clubs
			{
			ShowPlayerDialog(playerid, INTERIORMENU+13, DIALOG_STYLE_LIST, "Resturants & Clubs","Brothel \nBrothel 2 \nThe Big Spread Ranch \nDinner \nWorld Of Coq \nThe Pig Pen \nClub \nJay's Diner \nSecret Valley Diner \nFanny Batter's Whore House \nBack", "Select", "Cancel");
   			}
   			if(listitem == 13) // No Specific Group
			{
			ShowPlayerDialog(playerid, INTERIORMENU+14, DIALOG_STYLE_LIST, "No Specific Category","Blastin' Fools Records \nWarehouse \nWarehouse 2 \nBudget Inn Motel Room \nLil' Probe Inn \nCrack Den \nMeat Factory \nBike School \nDriving School \nBack", "Select", "Cancel");
   			}
   			if(listitem == 14) // Burglary Houses
			{
			ShowPlayerDialog(playerid, INTERIORMENU+15, DIALOG_STYLE_LIST, "Burglary Houses","Burglary House 1 \nBurglary House 2 \nBurglary House 3 \nBurglary House 4 \nBurglary House 5 \nBurglary House 6 \nBurglary House 7 \nBurglary House 8 \nBurglary House 9 \nBurglary House 10 \nBack", "Select", "Cancel");
   			}
			if(listitem == 15) // Burglary Houses 2
			{
			ShowPlayerDialog(playerid, INTERIORMENU+16, DIALOG_STYLE_LIST, "Burglary Houses 2","Burglary House 11 \nBurglary House 12 \nBurglary House 13 \nBurglary House 14 \nBurglary House 15 \nBurglary House 16 \nBack", "Select", "Cancel");
   			}
   			if(listitem == 16) // Gyms
			{
			ShowPlayerDialog(playerid, INTERIORMENU+17, DIALOG_STYLE_LIST, "Gyms","Los Santos Gym \nSan Fierro Gym \nLas Venturas Gym \nBack", "Select", "Cancel");
   			}
   			if(listitem == 17) // Departements
			{
			ShowPlayerDialog(playerid, INTERIORMENU+18, DIALOG_STYLE_LIST, "Departments","SF Police Department \nLS Police Department \nLV Police Department \nPlanning Department\nBack", "Select", "Cancel");
   			}
   			if(listitem == 18) // Back
			{
			ShowPlayerDialog(playerid, INTERIORMENU, DIALOG_STYLE_LIST, "Interior Categories","24/7's\nAirports\nAmmunations\nHouses\nHouses 2\nMissions\nStadiums\nCasinos\nShops\nGarages\nGirlfriends\nClothing/Barber Store\nResturants/Clubs\nNo Category\nBurglary\nBurglary 2\nGym\nDepartment\nBack", "Select", "Cancel");
   			}
		}
		return 0;
	}
//===================================24/7's===================================//
	if(dialogid == INTERIORMENU+1) // 24/7's
	{
		if(response)
		{
			if(listitem == 0) // 24/7 1
			{
		   	SetPlayerPos(playerid,-25.884499,-185.868988,1003.549988);
		    SetPlayerInterior(playerid,17);
			}
			if(listitem == 1) // 24/7 2
			{
		   	SetPlayerPos(playerid,-6.091180,-29.271898,1003.549988);
		    SetPlayerInterior(playerid,10);
			}
			if(listitem == 2) //  24/7 3
			{
		   	SetPlayerPos(playerid,-30.946699,-89.609596,1003.549988);
			SetPlayerInterior(playerid,18);
			}
			if(listitem == 3) //  24/7 4
			{
		   	SetPlayerPos(playerid,-25.132599,-139.066986,1003.549988);
		    SetPlayerInterior(playerid,16);
			}
			if(listitem == 4) //  24/7 5
			{
		   	SetPlayerPos(playerid,-27.312300,-29.277599,1003.549988);
		    SetPlayerInterior(playerid,4);
			}
			if(listitem == 5) // 24/7 6
			{
		   	SetPlayerPos(playerid,-26.691599,-55.714897,1003.549988);
		    SetPlayerInterior(playerid,6);
			}
			if(listitem == 6) // Back
  			{
			ShowPlayerDialog(playerid, INTERIORMENU, DIALOG_STYLE_LIST, "Interior Categories","24/7's\nAirports\nAmmunations\nHouses\nHouses 2\nMissions\nStadiums\nCasinos\nShops\nGarages\nGirlfriends\nClothing/Barber Store\nResturants/Clubs\nNo Category\nBurglary\nBurglary 2\nGym\nDepartment\nBack", "Select", "Cancel");
			}
		}
		return 1;
	}
//==================================Airports==================================//
	if(dialogid == INTERIORMENU+2) // Airport Interiors
	{
		if(response)
		{
			if(listitem == 0) // Francis Ticket Sales Airport
			{
		   	SetPlayerPos(playerid,-1827.147338,7.207418,1061.143554);
		    SetPlayerInterior(playerid,14);
			}
			if(listitem == 1) // Francis Baggage Claim Airport
			{
		   	SetPlayerPos(playerid,-1855.568725,41.263156,1061.143554);
		    SetPlayerInterior(playerid,14);
			}
			if(listitem == 2) // Andromada Cargo Hold
			{
		   	SetPlayerPos(playerid,315.856170,1024.496459,1949.797363);
		    SetPlayerInterior(playerid,9);
			}
			if(listitem == 3) // Shamal Cabin
			{
		   	SetPlayerPos(playerid,2.384830,33.103397,1199.849976);
		    SetPlayerInterior(playerid,1);
			}
			if(listitem == 4) // LS Airport Baggage Claim
			{
		   	SetPlayerPos(playerid,-1870.80,59.81,1056.25);
		    SetPlayerInterior(playerid,14);
			}
			if(listitem == 5) // Interernational Airport
			{
		   	SetPlayerPos(playerid,-1830.81,16.83,1061.14);
		    SetPlayerInterior(playerid,14);
			}
			if(listitem == 6) // Abounded AC Tower
			{
		   	SetPlayerPos(playerid, 419.8936, 2537.1155, 10);
		    SetPlayerInterior(playerid, 10);
			}
			if(listitem == 7) // Back
			{
			ShowPlayerDialog(playerid, INTERIORMENU, DIALOG_STYLE_LIST, "Interior Categories","24/7's\nAirports\nAmmunations\nHouses\nHouses 2\nMissions\nStadiums\nCasinos\nShops\nGarages\nGirlfriends\nClothing/Barber Store\nResturants/Clubs\nNo Category\nBurglary\nBurglary 2\nGym\nDepartment\nBack", "Select", "Cancel");
			}
		}
		return 1;
	}
//=================================Ammunation=================================//
	if(dialogid == INTERIORMENU+3) // Ammunations
	{
		if(response)
		{
			if(listitem == 0) // Ammunation 1
			{
		   	SetPlayerPos(playerid,286.148987,-40.644398,1001.569946);
		    SetPlayerInterior(playerid,1);
			}
			if(listitem == 1) // Ammunation 2
			{
		   	SetPlayerPos(playerid,286.800995,-82.547600,1001.539978);
		    SetPlayerInterior(playerid,4);
			}
			if(listitem == 2) // Ammunation 3
			{
		   	SetPlayerPos(playerid,296.919983,-108.071999,1001.569946);
		    SetPlayerInterior(playerid,6);
			}
			if(listitem == 3) // Ammunation 4
			{
		   	SetPlayerPos(playerid,314.820984,-141.431992,999.661987);
		    SetPlayerInterior(playerid,7);
			}
			if(listitem == 4) // Ammunation 5
			{
		   	SetPlayerPos(playerid,316.524994,-167.706985,999.661987);
		    SetPlayerInterior(playerid,6);
			}
			if(listitem == 5) // Booth Ammunation
			{
		   	SetPlayerPos(playerid,302.292877,-143.139099,1004.062500);
		    SetPlayerInterior(playerid,7);
			}
			if(listitem == 6) // Range Ammunation
			{
		   	SetPlayerPos(playerid,280.795104,-135.203353,1004.062500);
		    SetPlayerInterior(playerid,7);
			}
			if(listitem == 7) // Back
			{
			ShowPlayerDialog(playerid, INTERIORMENU, DIALOG_STYLE_LIST, "Interior Categories","24/7's\nAirports\nAmmunations\nHouses\nHouses 2\nMissions\nStadiums\nCasinos\nShops\nGarages\nGirlfriends\nClothing/Barber Store\nResturants/Clubs\nNo Category\nBurglary\nBurglary 2\nGym\nDepartment\nBack", "Select", "Cancel");
			}
		}
		return 1;
	}
//===================================Houses===================================//
	if(dialogid == INTERIORMENU+4) // Houses
	{
		if(response)
		{
			if(listitem == 0) // B Dup's Apartment
			{
		   	SetPlayerPos(playerid,1527.0468, -12.0236, 1002.0971);
		    SetPlayerInterior(playerid,3);
			}
			if(listitem == 1) // B Dup's Crack Palace
			{
		   	SetPlayerPos(playerid,1523.5098, -47.8211, 1002.2699);
		    SetPlayerInterior(playerid,2);
			}
			if(listitem == 2) // OG Loc's House
			{
		   	SetPlayerPos(playerid,512.9291, -11.6929, 1001.5653);
		    SetPlayerInterior(playerid,3);
			}
			if(listitem == 3) // Ryder's
			{
		   	SetPlayerPos(playerid,2447.8704, -1704.4509, 1013.5078);
		    SetPlayerInterior(playerid,2);
			}
			if(listitem == 4) // Sweet's
			{
		   	SetPlayerPos(playerid,2527.0176, -1679.2076, 1015.4986);
		    SetPlayerInterior(playerid,1);
			}
			if(listitem == 5) // Madd Dogg's Mansion
			{
		   	SetPlayerPos(playerid,1267.8407, -776.9587, 1091.9063);
		    SetPlayerInterior(playerid,5);
			}
			if(listitem == 6) // Big Smoke's Crack Palace
			{
		   	SetPlayerPos(playerid,2536.5322, -1294.8425, 1044.125);
		    SetPlayerInterior(playerid,2);
			}
			if(listitem == 7) // Back
			{
			ShowPlayerDialog(playerid, INTERIORMENU, DIALOG_STYLE_LIST, "Interior Categories","24/7's\nAirports\nAmmunations\nHouses\nHouses 2\nMissions\nStadiums\nCasinos\nShops\nGarages\nGirlfriends\nClothing/Barber Store\nResturants/Clubs\nNo Category\nBurglary\nBurglary 2\nGym\nDepartment\nBack", "Select", "Cancel");
			}
		}
		return 1;
	}
//===================================Safe Houses===================================//
	if(dialogid == INTERIORMENU+5) // Houses
	{
		if(response)
		{
			if(listitem == 0) // CJ's House
			{
		   	SetPlayerPos(playerid,2496.0549, -1695.1749, 1014.7422);
		    SetPlayerInterior(playerid,3);
			}
			if(listitem == 1) // Angel Pine trailer
			{
		   	SetPlayerPos(playerid,1.1853, -3.2387, 999.4284);
		    SetPlayerInterior(playerid,2);
			}
			if(listitem == 2) // Safe House
			{
		   	SetPlayerPos(playerid,2233.6919, -1112.8107, 1050.8828);
		    SetPlayerInterior(playerid,5);
			}
			if(listitem == 3) // Safe House 2
			{
		   	SetPlayerPos(playerid,2194.7900, -1204.3500, 1049.0234);
		    SetPlayerInterior(playerid,6);
			}
			if(listitem == 4) // Safe House 3
			{
		   	SetPlayerPos(playerid,2319.1272, -1023.9562, 1050.2109);
		    SetPlayerInterior(playerid,9);
			}
			if(listitem == 5) // Safe House 4
			{
		   	SetPlayerPos(playerid,2262.4797,-1138.5591,1050.6328);
		    SetPlayerInterior(playerid,10);
			}
			if(listitem == 6) // Verdant Bluff safehouse
			{
		   	SetPlayerPos(playerid,2365.1089, -1133.0795, 1050.875);
		    SetPlayerInterior(playerid,8);
			}
			if(listitem == 7) // Willowfield Safehouse
			{
		   	SetPlayerPos(playerid,2282.9099, -1138.2900, 1050.8984);
		    SetPlayerInterior(playerid,11);
			}
			if(listitem == 8) // The Camel's Toe Safehouse
			{
		   	SetPlayerPos(playerid,2216.1282, -1076.3052, 1050.4844);
		    SetPlayerInterior(playerid,1);
			}
			if(listitem == 9) // Back
			{
   			ShowPlayerDialog(playerid, INTERIORMENU, DIALOG_STYLE_LIST, "Interior Categories","24/7's\nAirports\nAmmunations\nHouses\nHouses 2\nMissions\nStadiums\nCasinos\nShops\nGarages\nGirlfriends\nClothing/Barber Store\nResturants/Clubs\nNo Category\nBurglary\nBurglary 2\nGym\nDepartment\nBack", "Select", "Cancel");
			}
		}
		return 1;
	}
//==================================Missions==================================//
	if(dialogid == INTERIORMENU+6) // Missions
	{
		if(response)
		{
			if(listitem == 0) // Atrium
			{
		   	SetPlayerPos(playerid,1726.18,-1641.00,20.23);
		    SetPlayerInterior(playerid,18);
			}

			if(listitem == 1) // Burning Desire
			{
		   	SetPlayerPos(playerid,2338.32,-1180.61,1027.98);
		    SetPlayerInterior(playerid,5);
			}
			if(listitem == 2) // Colonel Furhberger
			{
		   	SetPlayerPos(playerid,2807.63,-1170.15,1025.57);
		    SetPlayerInterior(playerid,8);
			}
			if(listitem == 3) // Welcome Pump(Dillimore)
			{
		   	SetPlayerPos(playerid,681.66,-453.32,-25.61);
		    SetPlayerInterior(playerid,1);
			}
			if(listitem == 4) // Woozies Apartment
			{
		   	SetPlayerPos(playerid,-2158.72,641.29,1052.38);
		    SetPlayerInterior(playerid,1);
			}
			if(listitem == 5) // Jizzy's
			{
		   	SetPlayerPos(playerid,-2637.69,1404.24,906.46);
		    SetPlayerInterior(playerid,3);
			}
			if(listitem == 6) // Dillimore Gas Station
			{
		   	SetPlayerPos(playerid,664.19,-570.73,16.34);
		    SetPlayerInterior(playerid,0);
			}
			if(listitem == 7) // Jefferson Motel
			{
		   	SetPlayerPos(playerid,2220.26,-1148.01,1025.80);
		    SetPlayerInterior(playerid,15);
			}
			if(listitem == 8) // Liberty City
			{
		   	SetPlayerPos(playerid,-750.80,491.00,1371.70);
		    SetPlayerInterior(playerid,1);
			}
			if(listitem == 9) // Sherman Dam
			{
		   	SetPlayerPos(playerid,-944.2402, 1886.1536, 5.0051);
		    SetPlayerInterior(playerid,17);
			}
			if(listitem == 10) // Back
			{
			ShowPlayerDialog(playerid, INTERIORMENU, DIALOG_STYLE_LIST, "Interior Categories","24/7's\nAirports\nAmmunations\nHouses\nHouses 2\nMissions\nStadiums\nCasinos\nShops\nGarages\nGirlfriends\nClothing/Barber Store\nResturants/Clubs\nNo Category\nBurglary\nBurglary 2\nGym\nDepartment\nBack", "Select", "Cancel");
			}
		}
		return 1;
	}
//=================================Missions 2=================================//
	if(dialogid == INTERIORMENU+7) //
	{
		if(response)
		{

			if(listitem == 0) // RC War Arena
			{
		   	SetPlayerPos(playerid,-1079.99,1061.58,1343.04);
		    SetPlayerInterior(playerid,10);
			}
			if(listitem == 1) // Racing Stadium
			{
		   	SetPlayerPos(playerid,-1395.958,-208.197,1051.170);
		    SetPlayerInterior(playerid,7);
			}
			if(listitem == 2) // Racing Stadium 2
			{
		   	SetPlayerPos(playerid,-1424.9319,-664.5869,1059.8585);
		    SetPlayerInterior(playerid,4);
			}
			if(listitem == 3) // Bloodbowl Stadium
			{
		   	SetPlayerPos(playerid,-1394.20,987.62,1023.96);
		    SetPlayerInterior(playerid,15);
			}
			if(listitem == 4) // Kickstart Stadium
			{
		   	SetPlayerPos(playerid,-1410.72,1591.16,1052.53);
		    SetPlayerInterior(playerid,14);
			}
			if(listitem == 5) // Back
			{
            ShowPlayerDialog(playerid, INTERIORMENU, DIALOG_STYLE_LIST, "Interior Categories","24/7's\nAirports\nAmmunations\nHouses\nHouses 2\nMissions\nStadiums\nCasinos\nShops\nGarages\nGirlfriends\nClothing/Barber Store\nResturants/Clubs\nNo Category\nBurglary\nBurglary 2\nGym\nDepartment\nBack", "Select", "Cancel");
			}
		}
		return 1;
	}
//===============================Casino Interiors================================//
	if(dialogid == INTERIORMENU+8) // Casino Interiors
	{
		if(response)
		{
			if(listitem == 0) // Caligulas
			{
		   	SetPlayerPos(playerid,2233.8032,1712.2303,1011.7632);
		    SetPlayerInterior(playerid,1);
			}
			if(listitem == 1) // 4 Dragons Casino
			{
		   	SetPlayerPos(playerid,2016.2699,1017.7790,996.8750);
		    SetPlayerInterior(playerid,10);
			}
			if(listitem == 2) // Redsands Casino
			{
			SetPlayerPos(playerid,1132.9063,-9.7726,1000.6797);
		    SetPlayerInterior(playerid,12);
			}
			if(listitem == 3) // 4 Dragons' Managerial Suite NOT SOLID
			{
		   	SetPlayerPos(playerid,2003.1178, 1015.1948, 33.008);
		    SetPlayerInterior(playerid,11);
			}
			if(listitem == 4) // Inside Track betting
			{
		   	SetPlayerPos(playerid,830.6016, 5.9404, 1004.1797);
		    SetPlayerInterior(playerid,3);
			}
			if(listitem == 5) // Caligulas Roof
			{
		   	SetPlayerPos(playerid,2268.5156, 1647.7682, 1084.2344);
		    SetPlayerInterior(playerid,1);
			}
			if(listitem == 6) // Rosenberg's Caligulas Office NOT SOLID FLOOR
			{
		   	SetPlayerPos(playerid,2182.2017, 1628.5848, 1043.8723);
		    SetPlayerInterior(playerid,2);
			}
			if(listitem == 7) // 4 Dragons Janitor's Office
			{
		   	SetPlayerPos(playerid,1893.0731, 1017.8958, 31.8828);
		    SetPlayerInterior(playerid,10);
			}
			if(listitem == 8) // Back
			{
			ShowPlayerDialog(playerid, INTERIORMENU, DIALOG_STYLE_LIST, "Interior Categories","24/7's\nAirports\nAmmunations\nHouses\nHouses 2\nMissions\nStadiums\nCasinos\nShops\nGarages\nGirlfriends\nClothing/Barber Store\nResturants/Clubs\nNo Category\nBurglary\nBurglary 2\nGym\nDepartment\nBack", "Select", "Cancel");
			}
		}
		return 1;
	}
//===============================Shop Interiors================================//
	if(dialogid == INTERIORMENU+9) // Shop Interiors
	{
		if(response)
		{
			if(listitem == 0) // Tattoo
			{
		   	SetPlayerPos(playerid,-203.0764,-24.1658,1002.2734);
		    SetPlayerInterior(playerid,16);
			}
			if(listitem == 1) // Burger Shot
			{
		   	SetPlayerPos(playerid,365.4099,-73.6167,1001.5078);
		    SetPlayerInterior(playerid,10);
			}
			if(listitem == 2) // Well Stacked Pizza
			{
		   	SetPlayerPos(playerid,372.3520,-131.6510,1001.4922);
		    SetPlayerInterior(playerid,5);
			}
			if(listitem == 3) // Cluckin Bell
			{
		   	SetPlayerPos(playerid,365.7158,-9.8873,1001.8516);
		    SetPlayerInterior(playerid,9);
			}
			if(listitem == 4) // Rusty Donut's
			{
		   	SetPlayerPos(playerid,378.026,-190.5155,1000.6328);
		    SetPlayerInterior(playerid,17);
			}
			if(listitem == 5) // Zero's
			{
		   	SetPlayerPos(playerid,-2240.1028, 136.973, 1035.4141);
		    SetPlayerInterior(playerid,6);
			}
			if(listitem == 6) // Sex Shop
			{
		   	SetPlayerPos(playerid,-100.2674, -22.9376, 1000.7188);
		    SetPlayerInterior(playerid,3);
			}
			if(listitem == 7) // Back
			{
			ShowPlayerDialog(playerid, INTERIORMENU, DIALOG_STYLE_LIST, "Interior Categories","24/7's\nAirports\nAmmunations\nHouses\nHouses 2\nMissions\nStadiums\nCasinos\nShops\nGarages\nGirlfriends\nClothing/Barber Store\nResturants/Clubs\nNo Category\nBurglary\nBurglary 2\nGym\nDepartment\nBack", "Select", "Cancel");
			}
		}
		return 1;
	}
//===================================MOD SHOPS/GARAGES==================================//
	if(dialogid == INTERIORMENU+10) //
	{
		if(response)
		{
			if(listitem == 0) // Loco Low Co.
			{
		   	SetPlayerPos(playerid,616.7820,-74.8151,997.6350);
		    SetPlayerInterior(playerid,2);
			}
			if(listitem == 1) // Wheel Arch Angels
			{
		   	SetPlayerPos(playerid,615.2851,-124.2390,997.6350);
		    SetPlayerInterior(playerid,3);
			}
			if(listitem == 2) // Transfender
			{
		   	SetPlayerPos(playerid,617.5380,-1.9900,1000.6829);
		    SetPlayerInterior(playerid,1);
			}
			if(listitem == 3) // Doherty Garage
			{
		   	SetPlayerPos(playerid,-2041.2334, 178.3969, 28.8465);
		    SetPlayerInterior(playerid,1);
			}
			if(listitem == 4) // Back
			{
			ShowPlayerDialog(playerid, INTERIORMENU, DIALOG_STYLE_LIST, "Interior Categories","24/7's\nAirports\nAmmunations\nHouses\nHouses 2\nMissions\nStadiums\nCasinos\nShops\nGarages\nGirlfriends\nClothing/Barber Store\nResturants/Clubs\nNo Category\nBurglary\nBurglary 2\nGym\nDepartment\nBack", "Select", "Cancel");
			}
		}
		return 1;
	}
//===================================Girlfriend Interiors==================================//
	if(dialogid == INTERIORMENU+11) //
	{
		if(response)
		{
			if(listitem == 0) // Denise's Bedroom
			{
		   	SetPlayerPos(playerid,245.2307, 304.7632, 999.1484);
		    SetPlayerInterior(playerid,1);
			}
			if(listitem == 1) // Helena's Barn
			{
		   	SetPlayerPos(playerid,290.623, 309.0622, 999.1484);
		    SetPlayerInterior(playerid,3);
			}
			if(listitem == 2) // Barbaras Love Nest
			{
		   	SetPlayerPos(playerid,322.5014, 303.6906, 999.1484);
		    SetPlayerInterior(playerid,5);
			}
			if(listitem == 3) // Katie's Lovenest
			{
		   	SetPlayerPos(playerid,269.6405, 305.9512, 999.1484);
		    SetPlayerInterior(playerid,2);
			}
			if(listitem == 4) // Michelle's Love Nest
			{
		   	SetPlayerPos(playerid,306.1966, 307.819, 1003.3047);
		    SetPlayerInterior(playerid,4);
			}
			if(listitem == 5) // Millie's Bedroom
			{
		   	SetPlayerPos(playerid,344.9984, 307.1824, 999.1557);
		    SetPlayerInterior(playerid,6);
			}
			if(listitem == 6) // Back
			{
			ShowPlayerDialog(playerid, INTERIORMENU, DIALOG_STYLE_LIST, "Interior Categories","24/7's\nAirports\nAmmunations\nHouses\nHouses 2\nMissions\nStadiums\nCasinos\nShops\nGarages\nGirlfriends\nClothing/Barber Store\nResturants/Clubs\nNo Category\nBurglary\nBurglary 2\nGym\nDepartment\nBack", "Select", "Cancel");
			}
		}
		return 1;
	}
//===================================CLOTHING/BARBER SHOP==================================//
	if(dialogid == INTERIORMENU+12) //
	{
		if(response)
		{
			if(listitem == 0) // Barber Shop
			{
		   	SetPlayerPos(playerid,418.4666, -80.4595, 1001.8047);
		    SetPlayerInterior(playerid,3);
			}
			if(listitem == 1) // Pro Laps
			{
		   	SetPlayerPos(playerid,206.4627, -137.7076, 1003.0938);
		    SetPlayerInterior(playerid,3);
			}
			if(listitem == 2) // Victim
			{
		   	SetPlayerPos(playerid,225.0306, -9.1838, 1002.218);
		    SetPlayerInterior(playerid,5);
			}
			if(listitem == 3) // Suburban
			{
		   	SetPlayerPos(playerid,204.1174, -46.8047, 1001.8047);
		    SetPlayerInterior(playerid,1);
			}
			if(listitem == 4) // Reece's Barber Shop
			{
		   	SetPlayerPos(playerid,414.2987, -18.8044, 1001.8047);
		    SetPlayerInterior(playerid,2);
			}
			if(listitem == 5) // Zip
			{
		   	SetPlayerPos(playerid,161.4048, -94.2416, 1001.8047);
		    SetPlayerInterior(playerid,18);
			}
			if(listitem == 6) // Didier Sachs
			{
		   	SetPlayerPos(playerid,204.1658, -165.7678, 1000.5234);
		    SetPlayerInterior(playerid,14);
			}
			if(listitem == 7) // Binco
			{
		   	SetPlayerPos(playerid,207.5219, -109.7448, 1005.1328);
		    SetPlayerInterior(playerid,15);
			}
			if(listitem == 8) // Barber Shop 2
			{
		   	SetPlayerPos(playerid,411.9707, -51.9217, 1001.8984);
		    SetPlayerInterior(playerid,12);
			}
			if(listitem == 9) // Wardrobe
			{
		   	SetPlayerPos(playerid,256.9047, -41.6537, 1002.0234);
		    SetPlayerInterior(playerid,14);
			}
			if(listitem == 10) // Back
			{
			ShowPlayerDialog(playerid, INTERIORMENU, DIALOG_STYLE_LIST, "Interior Categories","24/7's\nAirports\nAmmunations\nHouses\nHouses 2\nMissions\nStadiums\nCasinos\nShops\nGarages\nGirlfriends\nClothing/Barber Store\nResturants/Clubs\nNo Category\nBurglary\nBurglary 2\nGym\nDepartment\nBack", "Select", "Cancel");
			}
		}
		return 1;
	}
//===================================RESTURANTS/CLUBS==================================//
	if(dialogid == INTERIORMENU+13) //
	{
		if(response)
		{
			if(listitem == 0) // Brotel
			{
		   	SetPlayerPos(playerid,974.0177, -9.5937, 1001.1484);
		    SetPlayerInterior(playerid,3);
			}
			if(listitem == 1) // Brotel 2
			{
		   	SetPlayerPos(playerid,961.9308, -51.9071, 1001.1172);
		    SetPlayerInterior(playerid,3);
			}
			if(listitem == 2) // Big Spread Ranch
			{
		   	SetPlayerPos(playerid,1212.0762,-28.5799,1000.9531);
		    SetPlayerInterior(playerid,3);
			}
			if(listitem == 3) // Dinner
			{
		   	SetPlayerPos(playerid,454.9853, -107.2548, 999.4376);
		    SetPlayerInterior(playerid,5);
			}
			if(listitem == 4) // World Of Coq
			{
		   	SetPlayerPos(playerid,445.6003, -6.9823, 1000.7344);
		    SetPlayerInterior(playerid,1);
			}
			if(listitem == 5) // The Pig Pen
			{
		   	SetPlayerPos(playerid,1204.9326,-8.1650,1000.9219);
		    SetPlayerInterior(playerid,2);
			}
			if(listitem == 6) // Dance Club
			{
		   	SetPlayerPos(playerid,490.2701,-18.4260,1000.6797);
		    SetPlayerInterior(playerid,17);
			}
			if(listitem == 7) // Jay's Dinner
			{
		   	SetPlayerPos(playerid,449.0172, -88.9894, 999.5547);
		    SetPlayerInterior(playerid,4);
			}
			if(listitem == 8) // Secret Valley Dinner
			{
		   	SetPlayerPos(playerid,442.1295, -52.4782, 999.7167);
		    SetPlayerInterior(playerid,6);
			}
			if(listitem == 9) // Fanny Batter's Whore House
			{
		   	SetPlayerPos(playerid,748.4623, 1438.2378, 1102.9531);
		    SetPlayerInterior(playerid,6);
			}
			if(listitem == 10) // Back
			{
			ShowPlayerDialog(playerid, INTERIORMENU, DIALOG_STYLE_LIST, "Interior Categories","24/7's\nAirports\nAmmunations\nHouses\nHouses 2\nMissions\nStadiums\nCasinos\nShops\nGarages\nGirlfriends\nClothing/Barber Store\nResturants/Clubs\nNo Category\nBurglary\nBurglary 2\nGym\nDepartment\nBack", "Select", "Cancel");
			}
		}
		return 1;
	}
//===================================No Specific Group==================================//
	if(dialogid == INTERIORMENU+14) //
	{
		if(response)
		{
			if(listitem == 0) // Blastin' Fools Records
			{
		   	SetPlayerPos(playerid,1037.8276, 0.397, 1001.2845);
		    SetPlayerInterior(playerid,3);
			}
			if(listitem == 1) // Warehouse
			{
		   	SetPlayerPos(playerid,1290.4106, 1.9512, 1001.0201);
		    SetPlayerInterior(playerid,18);
			}
			if(listitem == 2) // Warehouse 2
			{
		   	SetPlayerPos(playerid,1411.4434,-2.7966,1000.9238);
		    SetPlayerInterior(playerid,1);
			}
			if(listitem == 3) // Budget Inn Motel Room
			{
		   	SetPlayerPos(playerid,446.3247, 509.9662, 1001.4195);
		    SetPlayerInterior(playerid,12);
			}
			if(listitem == 4) // Lil' Probe Inn
			{
		   	SetPlayerPos(playerid,-227.5703, 1401.5544, 27.7656);
		    SetPlayerInterior(playerid,18);
			}
			if(listitem == 5) //Crack Den
			{
		   	SetPlayerPos(playerid,318.5645, 1118.2079, 1083.8828);
		    SetPlayerInterior(playerid,5);
			}
			if(listitem == 6) // Meat Factory
			{
		   	SetPlayerPos(playerid,963.0586, 2159.7563, 1011.0303);
		    SetPlayerInterior(playerid,1);
			}
			if(listitem == 7) // Bike School
			{
		   	SetPlayerPos(playerid,1494.8589, 1306.48, 1093.2953);
		    SetPlayerInterior(playerid,3);
			}
			if(listitem == 8) // Driving School
			{
		   	SetPlayerPos(playerid,-2031.1196, -115.8287, 1035.1719);
		    SetPlayerInterior(playerid,3);
			}
			if(listitem == 9) // Back
			{
			ShowPlayerDialog(playerid, INTERIORMENU, DIALOG_STYLE_LIST, "Interior Categories","24/7's\nAirports\nAmmunations\nHouses\nHouses 2\nMissions\nStadiums\nCasinos\nShops\nGarages\nGirlfriends\nClothing/Barber Store\nResturants/Clubs\nNo Category\nBurglary\nBurglary 2\nGym\nDepartment\nBack", "Select", "Cancel");
			}
		}
		return 1;
	}
/*==============================Burglary Houses================================*/
	if(dialogid == INTERIORMENU+15) //
	{
		if(response)
		{
			if(listitem == 0) // Burglary House #1
			{
		   	SetPlayerPos(playerid,234.6087, 1187.8195, 1080.2578);
		    SetPlayerInterior(playerid,3);
			}
			if(listitem == 1) // Burglary House #2
			{
		   	SetPlayerPos(playerid,225.5707, 1240.0643, 1082.1406);
		    SetPlayerInterior(playerid,2);
			}
			if(listitem == 2) // Burglary House #3
			{
		   	SetPlayerPos(playerid,224.288, 1289.1907, 1082.1406);
		    SetPlayerInterior(playerid,1);
			}
			if(listitem == 3) // Burglary House #4
			{
		   	SetPlayerPos(playerid,239.2819, 1114.1991, 1080.9922);
		    SetPlayerInterior(playerid,5);
			}
			if(listitem == 4) // Burglary House #5
			{
		   	SetPlayerPos(playerid,295.1391, 1473.3719, 1080.2578);
		    SetPlayerInterior(playerid,15);
			}
			if(listitem == 5) // Burglary House #6
			{
		   	SetPlayerPos(playerid,261.1165, 1287.2197, 1080.2578);
		    SetPlayerInterior(playerid,4);
			}
			if(listitem == 6) // Burglary House #7
			{
			SetPlayerPos(playerid,24.3769, 1341.1829, 1084.375);
		    SetPlayerInterior(playerid,10);
			}
			if(listitem == 7) // Burglary House #8
			{
		   	SetPlayerPos(playerid,-262.1759, 1456.6158, 1084.3672);
		    SetPlayerInterior(playerid,4);
			}
			if(listitem == 8) // Burglary House #9
			{
		   	SetPlayerPos(playerid,22.861, 1404.9165, 1084.4297);
		    SetPlayerInterior(playerid,5);
			}
			if(listitem == 9) // Burglary House #10
			{
		   	SetPlayerPos(playerid,140.3679, 1367.8837, 1083.8621);
		    SetPlayerInterior(playerid,5);
			}
			if(listitem == 10) // Back
			{
			ShowPlayerDialog(playerid, INTERIORMENU, DIALOG_STYLE_LIST, "Interior Categories","24/7's\nAirports\nAmmunations\nHouses\nHouses 2\nMissions\nStadiums\nCasinos\nShops\nGarages\nGirlfriends\nClothing/Barber Store\nResturants/Clubs\nNo Category\nBurglary\nBurglary 2\nGym\nDepartment\nBack", "Select", "Cancel");
			}
		}
		return 1;
	}
//===============================Burglary Houses 2================================//
	if(dialogid == INTERIORMENU+16) //
	{
		if(response)
		{
			if(listitem == 0) // Burglary House #11
			{
		   	SetPlayerPos(playerid,234.2826, 1065.229, 1084.2101);
		    SetPlayerInterior(playerid,6);
			}
			if(listitem == 1) // Burglary House #12
			{
		   	SetPlayerPos(playerid,-68.5145, 1353.8485, 1080.2109);
		    SetPlayerInterior(playerid,6);
			}
			if(listitem == 2) // Burglary House #13
			{
		   	SetPlayerPos(playerid,-285.2511, 1471.197, 1084.375);
		    SetPlayerInterior(playerid,15);
			}
			if(listitem == 3) // Burglary House #14
			{
		   	SetPlayerPos(playerid,-42.5267, 1408.23, 1084.4297);
		    SetPlayerInterior(playerid,8);
			}
			if(listitem == 4) // Burglary House #15
			{
		   	SetPlayerPos(playerid,84.9244, 1324.2983, 1083.8594);
		    SetPlayerInterior(playerid,9);
			}
			if(listitem == 5) // Burglary House #16
			{
		   	SetPlayerPos(playerid,260.7421, 1238.2261, 1084.2578);
		    SetPlayerInterior(playerid,9);
			}
			if(listitem == 6) // Back
			{
			ShowPlayerDialog(playerid, INTERIORMENU, DIALOG_STYLE_LIST, "Interior Categories","24/7's\nAirports\nAmmunations\nHouses\nHouses 2\nMissions\nStadiums\nCasinos\nShops\nGarages\nGirlfriends\nClothing/Barber Store\nResturants/Clubs\nNo Category\nBurglary\nBurglary 2\nGym\nDepartment\nBack", "Select", "Cancel");
			}
		}
		return 1;
	}
//===============================Gyms================================//
	if(dialogid == INTERIORMENU+17) //
	{
		if(response)
		{
			if(listitem == 0) // LS Gym
			{
		   	SetPlayerPos(playerid,234.2826, 1065.229, 1084.2101);
		    SetPlayerInterior(playerid,6);
			}
			if(listitem == 1) // SF Gym
			{
		   	SetPlayerPos(playerid,771.8632,-40.5659,1000.6865);
		    SetPlayerInterior(playerid,6);
			}
			if(listitem == 2) // LV Gym
			{
		   	SetPlayerPos(playerid,774.0681,-71.8559,1000.6484);
		    SetPlayerInterior(playerid,7);
			}
			if(listitem == 3) // Back
			{
			ShowPlayerDialog(playerid, INTERIORMENU, DIALOG_STYLE_LIST, "Interior Categories","24/7's\nAirports\nAmmunations\nHouses\nHouses 2\nMissions\nStadiums\nCasinos\nShops\nGarages\nGirlfriends\nClothing/Barber Store\nResturants/Clubs\nNo Category\nBurglary\nBurglary 2\nGym\nDepartment\nBack", "Select", "Cancel");
			}
		}
		return 1;
	}
//===============================Departments================================//
	if(dialogid == INTERIORMENU+18) //
	{
		if(response)
		{
			if(listitem == 0) // SFPD
			{
		   	SetPlayerPos(playerid,246.40,110.84,1003.22);
		    SetPlayerInterior(playerid,10);
			}
			if(listitem == 1) // LSPD
			{
		   	SetPlayerPos(playerid,246.6695, 65.8039, 1003.6406);
		    SetPlayerInterior(playerid,6);
			}
			if(listitem == 2) // LVPD
			{
		   	SetPlayerPos(playerid,288.4723, 170.0647, 1007.1794);
		    SetPlayerInterior(playerid,3);
			}
			if(listitem == 3) // Planning Department(CITY HALL)
			{
		   	SetPlayerPos(playerid,386.5259, 173.6381, 1008.3828);
		    SetPlayerInterior(playerid,3);
			}
			if(listitem == 4) // Back
			{
			ShowPlayerDialog(playerid, INTERIORMENU, DIALOG_STYLE_LIST, "Interior Categories","24/7's\nAirports\nAmmunations\nHouses\nHouses 2\nMissions\nStadiums\nCasinos\nShops\nGarages\nGirlfriends\nClothing/Barber Store\nResturants/Clubs\nNo Category\nBurglary\nBurglary 2\nGym\nDepartment\nBack", "Select", "Cancel");
			}
		}
	}
	return 1;
}

//furniture placing and editing / saving furniture.
public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ)
{
    if(response != 1) return 1;
	switch(GetPVarInt(playerid, "EditorMode"))
	{
	    case 1: // Jueix's House system plant furniture
	    {
	        new key = GetPVarInt(playerid, "HouseKey");
	        SendClientMessage(playerid, COLOR_ORANGE, "To remove furniture go to /furniture then down to remove.");
	        new ModelFile[124];
			new XFile[124];
		 	new YFile[124];
		 	new ZFile[124];
		 	new String[124];
	        format(ModelFile,sizeof(ModelFile),"Houses/furnhouse%i.ini",key);
	        format(XFile,sizeof(XFile),"Houses/furnXhouse%i.ini",key);
	        format(YFile,sizeof(YFile),"Houses/furnYhouse%i.ini",key);
	        format(ZFile,sizeof(ZFile),"Houses/furnZhouse%i.ini",key);
	        format(String,sizeof(String),"ObjectID%i",PlayerEditSlot[playerid]);
	        DOF2_SetInt(ModelFile,String,FurnID[playerid]);
	        format(String,sizeof(String),"ObjectInt%i",PlayerEditSlot[playerid]);
	        DOF2_SetInt(ModelFile,String,GetPlayerInterior(playerid));
	        format(String,sizeof(String),"ObjectVw%i",PlayerEditSlot[playerid]);
	        DOF2_SetInt(ModelFile,String,GetPlayerVirtualWorld(playerid));
	        format(String,sizeof(String),"ObjectX%i",PlayerEditSlot[playerid]);
	        DOF2_SetFloat(XFile,String,fX);
	        format(String,sizeof(String),"ObjectRX%i",PlayerEditSlot[playerid]);
	        DOF2_SetFloat(XFile,String,fRotX);
	        format(String,sizeof(String),"ObjectY%i",PlayerEditSlot[playerid]);
	        DOF2_SetFloat(YFile,String,fY);
	        format(String,sizeof(String),"ObjectRY%i",PlayerEditSlot[playerid]);
	        DOF2_SetFloat(YFile,String,fRotY);
	        format(String,sizeof(String),"ObjectZ%i",PlayerEditSlot[playerid]);
	        DOF2_SetFloat(ZFile,String,fZ);
	        format(String,sizeof(String),"ObjectRZ%i",PlayerEditSlot[playerid]);
	        DOF2_SetFloat(ZFile,String,fRotZ);
	        HouseObject[key][PlayerEditSlot[playerid]] = CreateDynamicObject(FurnID[playerid], fX, fY, fZ, fRotX, fRotY, fRotZ, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), -1, 200.0);
			DOF2_WriteFile();
			DestroyPlayerObject(playerid,FurnObject[playerid]);
			HouseInfo[key][ObjectID][PlayerEditSlot[playerid]] = FurnID[playerid];
			DeletePVar(playerid,"EditorMode");
		}
	}
}

public OnPlayerModelSelection(playerid, response, listid, modelid)
{
	/*if(listid == furnlist)
	{
		if(response)
		{
			SendClientMessage(playerid, 0xFF0000FF, "Furniture spawned");
			new Float:pos[3];
			GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
			FurnObject[playerid] = CreatePlayerObject(playerid, modelid, pos[0], pos[1], pos[2], 0, 0, 0, 0.0);
			SetPVarInt(playerid, "EditorMode", 1);
			FurnID[playerid] = modelid;
			EditPlayerObject(playerid, FurnObject[playerid]);
		}
		else SendClientMessage(playerid, 0xFF0000FF, "Canceled furniture selection");
		return 1;
	}*/
	if(listid == furnmenu)
	{
        if(response)
		{
		    if(modelid == 1491)
		    {
		        ShowModelSelectionMenu(playerid, doors, "Furniture Catalog Doors");
		    }
		    if(modelid == 19355)
		    {
		        ShowModelSelectionMenu(playerid, walls, "Furniture Catalog Walls");
		    }
		    if(modelid == 1704)
		    {
		        ShowModelSelectionMenu(playerid, chairs, "Furniture Catalog Chairs");
		    }
		    if(modelid == 2566)
		    {
		        ShowModelSelectionMenu(playerid, beds, "Furniture Catalog Beds");
		    }
		    if(modelid == 2311)
		    {
		        ShowModelSelectionMenu(playerid, tables, "Furniture Catalog Tables");
		    }
		    if(modelid == 2069)
		    {
		        ShowModelSelectionMenu(playerid, lights, "Furniture Catalog Lights");
		    }
		    if(modelid == 1985)
		    {
		        ShowModelSelectionMenu(playerid, fitness, "Furniture Catalog Fitness");
		    }
		    if(modelid == 1792)
		    {
		        ShowModelSelectionMenu(playerid, eletronic, "Furniture Catalog Eletronics");
		    }
		    if(modelid == 2867)
		    {
		        ShowModelSelectionMenu(playerid, kitchen, "Furniture Catalog Kitchen");
		    }
		    if(modelid == 2526)
		    {
		        ShowModelSelectionMenu(playerid, bathroom, "Furniture Catalog Bathroom");
		    }
		}
		else SendClientMessage(playerid, 0xFF0000FF, "Canceled furniture selection");
	}
	if(listid == doors)
	{
		if(response)
		{
			SendClientMessage(playerid, 0xFF0000FF, "Furniture spawned");
			new Float:pos[3];
			GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
			FurnObject[playerid] = CreatePlayerObject(playerid, modelid, pos[0]+4, pos[1], pos[2], 0, 0, 0, 0.0);
			SetPVarInt(playerid, "EditorMode", 1);
			FurnID[playerid] = modelid;
			EditPlayerObject(playerid, FurnObject[playerid]);
		}
		else SendClientMessage(playerid, 0xFF0000FF, "Canceled furniture selection");
	}
	if(listid == walls)
	{
		if(response)
		{
			SendClientMessage(playerid, 0xFF0000FF, "Furniture spawned");
			new Float:pos[3];
			GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
			FurnObject[playerid] = CreatePlayerObject(playerid, modelid, pos[0]+4, pos[1], pos[2], 0, 0, 0, 0.0);
			SetPVarInt(playerid, "EditorMode", 1);
			FurnID[playerid] = modelid;
			EditPlayerObject(playerid, FurnObject[playerid]);
		}
		else SendClientMessage(playerid, 0xFF0000FF, "Canceled furniture selection");
	}
	if(listid == chairs)
	{
		if(response)
		{
			SendClientMessage(playerid, 0xFF0000FF, "Furniture spawned");
			new Float:pos[3];
			GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
			FurnObject[playerid] = CreatePlayerObject(playerid, modelid, pos[0]+4, pos[1], pos[2], 0, 0, 0, 0.0);
			SetPVarInt(playerid, "EditorMode", 1);
			FurnID[playerid] = modelid;
			EditPlayerObject(playerid, FurnObject[playerid]);
		}
		else SendClientMessage(playerid, 0xFF0000FF, "Canceled furniture selection");
	}
	if(listid == beds)
	{
		if(response)
		{
			SendClientMessage(playerid, 0xFF0000FF, "Furniture spawned");
			new Float:pos[3];
			GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
			FurnObject[playerid] = CreatePlayerObject(playerid, modelid, pos[0]+4, pos[1], pos[2], 0, 0, 0, 0.0);
			SetPVarInt(playerid, "EditorMode", 1);
			FurnID[playerid] = modelid;
			EditPlayerObject(playerid, FurnObject[playerid]);
		}
		else SendClientMessage(playerid, 0xFF0000FF, "Canceled furniture selection");
	}
	if(listid == tables)
	{
		if(response)
		{
			SendClientMessage(playerid, 0xFF0000FF, "Furniture spawned");
			new Float:pos[3];
			GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
			FurnObject[playerid] = CreatePlayerObject(playerid, modelid, pos[0]+4, pos[1], pos[2], 0, 0, 0, 0.0);
			SetPVarInt(playerid, "EditorMode", 1);
			FurnID[playerid] = modelid;
			EditPlayerObject(playerid, FurnObject[playerid]);
		}
		else SendClientMessage(playerid, 0xFF0000FF, "Canceled furniture selection");
	}
	if(listid == lights)
	{
		if(response)
		{
			SendClientMessage(playerid, 0xFF0000FF, "Furniture spawned");
			new Float:pos[3];
			GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
			FurnObject[playerid] = CreatePlayerObject(playerid, modelid, pos[0]+4, pos[1], pos[2], 0, 0, 0, 0.0);
			SetPVarInt(playerid, "EditorMode", 1);
			FurnID[playerid] = modelid;
			EditPlayerObject(playerid, FurnObject[playerid]);
		}
		else SendClientMessage(playerid, 0xFF0000FF, "Canceled furniture selection");
	}
	if(listid == fitness)
	{
		if(response)
		{
			SendClientMessage(playerid, 0xFF0000FF, "Furniture spawned");
			new Float:pos[3];
			GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
			FurnObject[playerid] = CreatePlayerObject(playerid, modelid, pos[0]+4, pos[1], pos[2], 0, 0, 0, 0.0);
			SetPVarInt(playerid, "EditorMode", 1);
			FurnID[playerid] = modelid;
			EditPlayerObject(playerid, FurnObject[playerid]);
		}
		else SendClientMessage(playerid, 0xFF0000FF, "Canceled furniture selection");
	}
	if(listid == eletronic)
	{
		if(response)
		{
			SendClientMessage(playerid, 0xFF0000FF, "Furniture spawned");
			new Float:pos[3];
			GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
			FurnObject[playerid] = CreatePlayerObject(playerid, modelid, pos[0]+4, pos[1], pos[2], 0, 0, 0, 0.0);
			SetPVarInt(playerid, "EditorMode", 1);
			FurnID[playerid] = modelid;
			EditPlayerObject(playerid, FurnObject[playerid]);
		}
		else SendClientMessage(playerid, 0xFF0000FF, "Canceled furniture selection");
	}
	if(listid == kitchen)
	{
		if(response)
		{
			SendClientMessage(playerid, 0xFF0000FF, "Furniture spawned");
			new Float:pos[3];
			GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
			FurnObject[playerid] = CreatePlayerObject(playerid, modelid, pos[0]+4, pos[1], pos[2], 0, 0, 0, 0.0);
			SetPVarInt(playerid, "EditorMode", 1);
			FurnID[playerid] = modelid;
			EditPlayerObject(playerid, FurnObject[playerid]);
		}
		else SendClientMessage(playerid, 0xFF0000FF, "Canceled furniture selection");
	}
	if(listid == bathroom)
	{
		if(response)
		{
			SendClientMessage(playerid, 0xFF0000FF, "Furniture spawned");
			new Float:pos[3];
			GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
			FurnObject[playerid] = CreatePlayerObject(playerid, modelid, pos[0]+4, pos[1], pos[2], 0, 0, 0, 0.0);
			SetPVarInt(playerid, "EditorMode", 1);
			FurnID[playerid] = modelid;
			EditPlayerObject(playerid, FurnObject[playerid]);
		}
		else SendClientMessage(playerid, 0xFF0000FF, "Canceled furniture selection");
	}
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

//Furniture commands
CMD:furniture(playerid, params[])
{
	new h = GetPVarInt(playerid,"HouseKey");
	if(GetPVarInt(playerid,"HouseKey") == 501) return SendClientMessage(playerid, COLOR_LIGHTRED, "Error: You do not own a house!");
	if(HouseInfo[GetPVarInt(playerid,"HouseKey")][hType] == 0)
	{
    	if(IsPlayerInRangeOfPoint(playerid, 30.0,HouseInfo[h][HouseIntPos][0],HouseInfo[h][HouseIntPos][1],HouseInfo[h][HouseIntPos][2]) && GetPlayerVirtualWorld(playerid) == HouseInfo[h][hVw])
    	{
        	ShowPlayerDialog(playerid, HouseFurniture, DIALOG_STYLE_LIST, "Furniture Menu", "Add Furniture\nRemove Furniture\nRemove All Furniture\nEdit Furniture Colour\nEdit Furniture Position", "Continue", "Cancel");
        	return 1;
    	}
    	else return SendClientMessage(playerid, COLOR_LIGHTRED, "Error: You are not near anyhouse that allow's you to use this!");
	}
	if(HouseInfo[GetPVarInt(playerid,"HouseKey")][hType] == 1)
	{
	    if(IsPlayerInRangeOfPoint(playerid, 30.0,HouseInfo[h][HouseEnterPos][0],HouseInfo[h][HouseEnterPos][1],HouseInfo[h][HouseEnterPos][2]))
    	{
        	ShowPlayerDialog(playerid, HouseFurniture, DIALOG_STYLE_LIST, "Furniture Menu", "Add Furniture\nRemove Furniture\nRemove All Furniture\nEdit Furniture Colour\nEdit Furniture Position", "Continue", "Cancel");
        	return 1;
    	}
    	else return SendClientMessage(playerid, COLOR_LIGHTRED, "Error: You are not near anyhouse that allow's you to use this!");
	}
	return 1;
}

CMD:househelp(playerid, params[])
{
    SendClientMessage(playerid, COLOR_ORANGE, "This server is using Jueixs House System made by Jueix.");
    SendClientMessage(playerid, COLOR_ORANGE, "To get started, Go upto a house and press h to buy from there just use /furniture.");
	return 1;
}
//Admin Commands
CMD:createhouse(playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid, COLOR_ORANGE, "To add an interior type /houseints then go down to interiors or blank interiors.");
        ShowPlayerDialog(playerid, HouseCreate, DIALOG_STYLE_LIST, "House Creation Menu", "Set Price\nSet Rent Price\nSet Entry Point\nSet Interior\nInterior Teleports\nCreate", "Continue", "Cancel");
        return 1;
    }
    else return SendClientMessage(playerid, COLOR_RED, "Server: You do not have permission to use this command.");
}

COMMAND:houseints(playerid, params[])
{
	if(IsPlayerAdmin(playerid))
	{
	    ShowPlayerDialog(playerid, TeleportMenu, DIALOG_STYLE_LIST, "House Interiors", "Interiors\nBlank Interiors", "Continue", "Cancel");
	    return 1;
	}
	else return SendClientMessage(playerid, COLOR_RED, "Server: You do not have permission to use this command.");
}

//stocks
stock GetHouses()
{
	new file[60];
	for(new i = 0; i < MAX_HOUSES;i++)
	{
		format(file,sizeof(file),"Houses/house%i.ini",i);
		if(!DOF2_FileExists(file)) return i;
	}
 	return -1;
}

stock GetHouseID(playerid)
{
	for(new i=0; i<MAX_HOUSES; i++)
	{
	    if(PlayerToPoint(3.0, playerid, HouseInfo[i][HouseEnterPos][0],HouseInfo[i][HouseEnterPos][1],HouseInfo[i][HouseEnterPos][2]))
	    {
	        return i;
		}
	}
	return 1;
}

stock LoadHouses()
{
	for(new i = 0; i < MAX_HOUSES;i++)
	{
	    new house[256];
		format(house, sizeof(house), "Houses/house%i.ini",i);
		if(DOF2_FileExists(house))
		{
		    //strings
		    format(HouseInfo[i][OwnerName], 124, DOF2_GetString(house, "OwnerName"));
		    format(HouseInfo[i][RenterName], 124, DOF2_GetString(house, "RenterName"));
			//Int's
			HouseInfo[i][Owned] = DOF2_GetInt(house, "Owned");
			HouseInfo[i][Rented] = DOF2_GetInt(house, "Rented");
			HouseInfo[i][hPrice] = DOF2_GetInt(house, "Price");
			HouseInfo[i][hLocked] = DOF2_GetInt(house, "Locked");
			HouseInfo[i][hInt] = DOF2_GetInt(house, "Int");
			HouseInfo[i][hVw] = DOF2_GetInt(house, "VW");
			HouseInfo[i][hDoorID] = DOF2_GetInt(house, "DoorID");
			HouseInfo[i][hRentPrice] = DOF2_GetInt(house, "RentPrice");
			HouseInfo[i][hType] = DOF2_GetInt(house, "Type");
			//Floats
			HouseInfo[i][HouseEnterPos][0] = DOF2_GetFloat(house, "X");
			HouseInfo[i][HouseEnterPos][1] = DOF2_GetFloat(house, "Y");
			HouseInfo[i][HouseEnterPos][2] = DOF2_GetFloat(house, "Z");
			HouseInfo[i][HouseIntPos][0] = DOF2_GetFloat(house, "IX");
			HouseInfo[i][HouseIntPos][1] = DOF2_GetFloat(house, "IY");
			HouseInfo[i][HouseIntPos][2] = DOF2_GetFloat(house, "IZ");
			HouseInfo[i][hDoorPos][0] = DOF2_GetFloat(house, "DX");
			HouseInfo[i][hDoorPos][1] = DOF2_GetFloat(house, "DY");
			HouseInfo[i][hDoorPos][2] = DOF2_GetFloat(house, "DZ");
			HouseInfo[i][hDoorRot][0] = DOF2_GetFloat(house, "DRZ");
			HouseInfo[i][hDoorRot][1] = DOF2_GetFloat(house, "DORZ");
			if(HouseInfo[i][Owned] == 0)
			{
			    new string[256];
			    format(string, sizeof(string), "House for sale\nBuy Price:$%d\nRent Price(per payday):$%d\nPress H to enter", HouseInfo[i][hPrice],HouseInfo[i][hRentPrice]);
 		    	House3D[i] = CreateDynamic3DTextLabel(string,0xFFFFFFFF,HouseInfo[i][HouseEnterPos][0],HouseInfo[i][HouseEnterPos][1],HouseInfo[i][HouseEnterPos][2]+0.75, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0, 0, -1, 100.0);
    			CreateDynamicPickup(1273, 1, HouseInfo[i][HouseEnterPos][0],HouseInfo[i][HouseEnterPos][1],HouseInfo[i][HouseEnterPos][2]);
			}
			if(HouseInfo[i][Owned] == 1)
			{
			    new string[256];
			    format(string, sizeof(string), "House Owned By %s:\n Price: %d\nPress H to enter", HouseInfo[i][OwnerName], HouseInfo[i][hPrice]);
        		House3D[i] = CreateDynamic3DTextLabel(string,0xFFFFFFFF,HouseInfo[i][HouseEnterPos][0],HouseInfo[i][HouseEnterPos][1],HouseInfo[i][HouseEnterPos][2]+0.75, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0, 0, -1, 100.0);
    			CreateDynamicPickup(1273, 1, HouseInfo[i][HouseEnterPos][0],HouseInfo[i][HouseEnterPos][1],HouseInfo[i][HouseEnterPos][2]);
			}
			if(HouseInfo[i][Owned] == 2)
			{
			    new string[256];
			    format(string, sizeof(string), "House Rented By %s:\nRent Price(per payday): %d\nPress H to enter", HouseInfo[i][OwnerName], HouseInfo[i][hRentPrice]);
        		House3D[i] = CreateDynamic3DTextLabel(string,0xFFFFFFFF,HouseInfo[i][HouseEnterPos][0],HouseInfo[i][HouseEnterPos][1],HouseInfo[i][HouseEnterPos][2]+0.75, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0, 0, -1, 100.0);
    			CreateDynamicPickup(1273, 1, HouseInfo[i][HouseEnterPos][0],HouseInfo[i][HouseEnterPos][1],HouseInfo[i][HouseEnterPos][2]);
			}
			/*if(HouseInfo[i][hType] == 1)
			{
			    HouseDoor[i] = CreateObject(HouseInfo[i][hDoorID], HouseInfo[i][hDoorPos][0],HouseInfo[i][hDoorPos][1],HouseInfo[i][hDoorPos][2], 0.0, 0.0, HouseInfo[i][hDoorRot][0], 96.0); //Object will render at its default distance.
			}*/
			for(new h = 0; h < MAX_FURNITURE;h++)
			{
			    new ModelFile[124];
				new XFile[124];
		 		new YFile[124];
		 		new ZFile[124];
			    new String[124];
			    format(ModelFile,sizeof(ModelFile),"Houses/furnhouse%i.ini",i);
     			format(XFile,sizeof(XFile),"Houses/furnXhouse%i.ini",i);
	        	format(YFile,sizeof(YFile),"Houses/furnYhouse%i.ini",i);
	        	format(ZFile,sizeof(ZFile),"Houses/furnZhouse%i.ini",i);
				//Load part
			    format(String,sizeof(String),"ObjectID%i",h);
	        	HouseInfo[i][ObjectID][h] = DOF2_GetInt(ModelFile,String);
	        	format(String,sizeof(String),"ObjectInt%i",h);
	        	HouseInfo[i][ObjectInt][h] = DOF2_GetInt(ModelFile,String);
	        	format(String,sizeof(String),"ObjectVw%i",h);
	        	HouseInfo[i][ObjectVW][h] = DOF2_GetInt(ModelFile,String);
	        	format(String,sizeof(String),"ObjectX%i",h);
	        	HouseInfo[i][ObjectPosX][h] = DOF2_GetFloat(XFile,String);
	        	format(String,sizeof(String),"ObjectRX%i",h);
	        	HouseInfo[i][ObjectPosRX][h] = DOF2_GetFloat(XFile,String);
	        	format(String,sizeof(String),"ObjectY%i",h);
	        	HouseInfo[i][ObjectPosY][h] = DOF2_GetFloat(YFile,String);
	        	format(String,sizeof(String),"ObjectRY%i",h);
	        	HouseInfo[i][ObjectPosRY][h] = DOF2_GetFloat(YFile,String);
       		 	format(String,sizeof(String),"ObjectZ%i",h);
	        	HouseInfo[i][ObjectPosZ][h] = DOF2_GetFloat(ZFile,String);
	        	format(String,sizeof(String),"ObjectRZ%i",h);
	        	HouseInfo[i][ObjectPosRZ][h] = DOF2_GetFloat(ZFile,String);
	        	if(HouseInfo[i][ObjectID][h] > 0)
				{
				    HouseObject[i][h] = CreateDynamicObject(HouseInfo[i][ObjectID][h], HouseInfo[i][ObjectPosX][h], HouseInfo[i][ObjectPosY][h], HouseInfo[i][ObjectPosZ][h], HouseInfo[i][ObjectPosRX][h], HouseInfo[i][ObjectPosRY][h], HouseInfo[i][ObjectPosRZ][h], HouseInfo[i][ObjectVW][h], HouseInfo[i][ObjectInt][h], -1, 200.0);
				}
			}
		}
	}
	printf("Houses created");
	return 1;
}

stock PlayerName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    return name;
}

stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
    if(IsPlayerConnected(playerid))
	{
		new Float:oldposx, Float:oldposy, Float:oldposz;
		new Float:tempposx, Float:tempposy, Float:tempposz;
		GetPlayerPos(playerid, oldposx, oldposy, oldposz);
		tempposx = (oldposx -x);
		tempposy = (oldposy -y);
		tempposz = (oldposz -z);
		if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
		{
			return 1;
		}
	}
	return 0;
}
Reply
#9

Mano pelo menos faz alguma coisa.

No fs do grafite vocк baixou a versгo dof2 ou mysql?
Reply
#10

https://sampwiki.blast.hk/wiki/OnPlayerClickTextDraw

PHP код:
public OnPlayerClickTextDraw(playeridText:clickedid)
{
    if(
clickedid == gTextDraw)
    {
         
SendClientMessage(playerid0xFFFFFFAA"You clicked on a textdraw.");
         
CancelSelectTextDraw(playerid);
         return 
1// retornando 1 nгo passa o script para o gamemode. Se vocк encontrou nгo precisa passar o script.
    
}
    return 
0// retornando 0 ele irar passar o script para o gamemode, ou seja OnPlayerClickTextDraw serб chamada no gamemode.

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

Exemplo de uso no FS:
PHP код:
Public OnDialogResponse playeriddialogidresponselistiteminputtext [ ] ) 

    if ( 
dialogid == DIALOG_RULES// Encontrou o id do dialog
    

        if ( 
response )
        { 
            
SendClientMessage (playeridCOLOR_GREEN"Obrigado por concordando com as regras do servidor! " ) ;
        } 
        else
        { 
            
Kick playerid ) ;
        } 
        
retornar 1// retorna 1 impede de o script ser chamado no GameMode
    
}
    
retornar 0;// Nгo encontrou nenhum id de dialog, entгo ele passa para OnDialogResponse no gamemode.

obs: exemplos retirados da wiki
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)