hey I have this
this is when some one enter a house, but when I lock the house and try to enter it send me that the house is locked but tho it set my pos in the house so how to break and stop every thing if the house was locked?
PHP Code:
else if (areatype[areaid][0] == AREA_TYPE_EPROP)
{
if (IsPlayerInAnyVehicle(playerid) || (GetPlayerVirtualWorld(playerid) != 0 && GetPlayerVirtualWorld(playerid) < 10000)) return 1;
new playername[MAX_PLAYER_NAME], Float:x, Float:y;
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
new string[256], name[MAX_PLAYER_NAME], str[256];
GetPlayerName(playerid, name, sizeof(name));
new temp2;
temp2 = dini_Int(AddDirFile(dir_datafiles, FILE_TOTALSTAT), "maxpropint");
for (new i = 1; i <= temp2; i++)
{
format(string, sizeof(string), "propint%d", i);
format(str, sizeof(str), "prop%d", dini_Int(AddDirFile(dir_propints, string), "propid"));
if(dini_Int(AddDirFile(dir_propints, string), "locked")==1)
{
SendClientMessage(playerid, COLOR_RED, "ERROR:This Property Is Locked.");
return 1;
}
x = adata[adata[areatype[areaid][1]][linkto]][ax] + floatsin(-adata[adata[areatype[areaid][1]][linkto]][aa], degrees) * 2.3;
y = adata[adata[areatype[areaid][1]][linkto]][ay] + floatcos(-adata[adata[areatype[areaid][1]][linkto]][aa], degrees) * 2.3;
SetPlayerVirtualWorld2(playerid, 10000+areaid);
SetPlayerInterior(playerid, adata[adata[areatype[areaid][1]][linkto]][ai]);
SetPlayerPos(playerid, x, y, adata[adata[areatype[areaid][1]][linkto]][az]);
SetPlayerFacingAngle(playerid, adata[adata[areatype[areaid][1]][linkto]][aa]);
SetCameraBehindPlayer(playerid);
plastdoor[playerid] = areatype[areaid][1];
}
}