07.09.2012, 13:09
Thanks for noticing this Jeffry, Yea I forgot Garhouse doesn't exist. So here it is. Anyway the only way to Enter a House is by going in a Checkpoint. There is no command to Enter.
THIS IS THE FILTERSCRIPT FOR GARHOUSE:
http://pastebin.com/RMbk1myC
pawn Код:
#if GH_USE_CPS == true
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
new string[256], tmpstring[50];
foreach(Houses, h)
{
if(checkpointid == HouseCPOut[h])
{
SetPVarInt(playerid, "LastHouseCP", h);
if(!strcmp(hInfo[h][HouseOwner], pNick(playerid), CASE_SENSETIVE))
{
SetPlayerHouseInterior(playerid, h);
ShowInfoBoxEx(playerid, COLOUR_INFO, I_HMENU);
break;
}
format(tmpstring, sizeof(tmpstring), "HouseKeys_%d", h);
if(GetPVarInt(playerid, tmpstring) == 1)
{
SetPlayerHouseInterior(playerid, h);
break;
}
if(strcmp(hInfo[h][HouseOwner], pNick(playerid), CASE_SENSETIVE) && strcmp(hInfo[h][HouseOwner], INVALID_HOWNER_NAME, CASE_SENSETIVE))
{
if(hInfo[h][HousePassword] == udb_hash("INVALID_HOUSE_PASSWORD"))
{
switch(hInfo[h][ForSale])
{
case 0: ShowInfoBox(playerid, LABELTEXT2, hInfo[h][HouseName], hInfo[h][HouseOwner], hInfo[h][HouseValue], h);
case 1:
{
switch(hInfo[h][HousePrivacy])
{
case 0: ShowPlayerDialog(playerid, HOUSEMENU+23, DIALOG_STYLE_LIST, INFORMATION_HEADER, "Buy House (Step 1)\nBreak In", "Select", "Cancel");
case 1: ShowPlayerDialog(playerid, HOUSEMENU+23, DIALOG_STYLE_LIST, INFORMATION_HEADER, "Buy House (Step 1)\nBreak In\nEnter House", "Select", "Cancel");
}
}
}
break;
}
if(hInfo[h][HousePassword] != udb_hash("INVALID_HOUSE_PASSWORD"))
{
switch(hInfo[h][ForSale])
{
case 0:
{
switch(hInfo[h][HousePrivacy])
{
case 0: ShowPlayerDialog(playerid, HOUSEMENU+28, DIALOG_STYLE_LIST, INFORMATION_HEADER, "Enter House Using Password\nBreak In", "Select", "Cancel");
case 1: ShowPlayerDialog(playerid, HOUSEMENU+28, DIALOG_STYLE_LIST, INFORMATION_HEADER, "Enter House Using Password\nBreak In\nEnter House", "Select", "Cancel");
}
}
case 1: ShowPlayerDialog(playerid, HOUSEMENU+23, DIALOG_STYLE_LIST, INFORMATION_HEADER, "Buy House (Step 1)\nBreak In\nEnter House", "Select", "Cancel");
}
break;
}
}
if(!strcmp(hInfo[h][HouseOwner], INVALID_HOWNER_NAME, CASE_SENSETIVE) && hInfo[h][HouseValue] > 0 && GetPVarInt(playerid, "JustCreatedHouse") == 0)
{
format(string, sizeof(string), HMENU_BUY_HOUSE, hInfo[h][HouseValue]);
ShowPlayerDialog(playerid, HOUSEMENU+4, DIALOG_STYLE_MSGBOX, INFORMATION_HEADER, string, "Buy", "Cancel");
break;
}
}
if(checkpointid == HouseCPInt[h])
{
switch(GetPVarInt(playerid, "HousePreview"))
{
case 0: ExitHouse(playerid, h);
#if GH_HINTERIOR_UPGRADE == true
case 1:
{
GetPVarString(playerid, "HousePrevName", tmpstring, 50);
format(string, sizeof(string), HMENU_BUY_HINTERIOR, tmpstring, GetPVarInt(playerid, "HousePrevValue"));
ShowPlayerDialog(playerid, HOUSEMENU+17, DIALOG_STYLE_MSGBOX, INFORMATION_HEADER, string, "Buy", "Cancel");
}
#endif
}
break;
}
}
}
return 1;
}
public OnPlayerLeaveDynamicCP(playerid, checkpointid)
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && GetPVarInt(playerid, "JustCreatedHouse") == 1)
{
foreach(Houses, h)
{
if(checkpointid == HouseCPOut[h])
{
DeletePVar(playerid, "JustCreatedHouse");
break;
}
}
}
return 1;
}
http://pastebin.com/RMbk1myC