Need Help Here +rep
#1

hi . so i have this code :
Код:
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");
						}
				}
		}
	}
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
Reply
#2

Probably something to do with your HouseID variable, possible that it's value is 0 and that's why you're having this issue.
Reply
#3

#define MAX_HOUSES 1000
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)