07.12.2018, 16:02
hi . so i have this code :
it will always show the enter\n"LOCK Doors" menu ! 'but' it will work fine on houses that have 0 ID (i mean when the i = 0 it will work how i want ! and when the doorlock == 0 it will show LockDoors and when doorlock == 1 will show open doors option!) whats the problem with this guys ? can you help me?
sorry for my bad english
Код:
if(newkeys == KEY_CTRL_BACK || newkeys == KEY_LOOK_BEHIND)
{
for(new i = 0; i < MAX_HOUSES; i++)
{
new pname[24];
GetPlayerName(playerid,plname,sizeof(plname));
if(IsPlayerInRangeOfPoint(playerid,0.8,House[i][houseX],House[i][hY],House[i][hZ]))
{
if(House[i][Owned] == 1 && HouseID[playerid] == i)
{
new string[128];
if(House[i][doorlock] == 0)
{
format(string,sizeof(string),"Enter\nLock Doors");
}
else if(House[i][doorlock] == 1)
{
format(string,sizeof(string),"Enter\nOpen Doors");
}
ShowPlayerDialog(playerid,Dialog_House,DIALOG_STYLE_LIST,"House Config Menu",string,"Enter","Cancel");
}
}
}
}
sorry for my bad english

