Problem with Houses and Businesses
#1

Hello everyone... I've got a house and biz system.
When people buy House or Business he automaticaly teleports in this biz or house.
Of course Doors are locked for this house/biz, but the thing is. This owner cant unlock doors, when hes inside.
Server says, than hes not an owner of this busines.. Maybe someone can help me.

Код:
if(strcmp(cmd, "/openhouse", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	    for(new i = 0; i < sizeof(Houses); i++)
			{
				if (PlayerToPoint(3.0, playerid,Houses[i][EnterX], Houses[i][EnterY], Houses[i][EnterZ]) || PlayerToPoint(3.0, playerid,Houses[i][ExitX], Houses[i][ExitY], Houses[i][ExitZ]))
				{
					if(PlayerInfo[playerid][pHouseKey] == i)
					{
						if(Houses[i][Locked] == 1)
						{
							Houses[i][Locked] = 0;
							SendClientMessage(playerid, COLOR_LIGHTYELLOW2,"[INFO:] Durvis Atvērtas.");
		          PlayerActionMessage(playerid,15.0,"izvelk atslēgu no kabatas un atslēdz durvis.");
		          SaveHouses();
							return 1;
						}
						if(Houses[i][Locked] == 0)
						{
							Houses[i][Locked] = 1;
							SendClientMessage(playerid, COLOR_LIGHTYELLOW2,"[INFO:] Durvis Aizslēgtas.");
		          PlayerActionMessage(playerid,15.0,"izvelk atslēgu no kabatas un aizslēdz durvis.");
		          SaveHouses();
							return 1;
						}
					}
					else
					{
						SendClientMessage(playerid, COLOR_LIGHTYELLOW2,"[ERROR:] Tev nav atslēgas љai mājai!");
						return 1;
					}
				}
			}
	  }
	  return 1;
	}
THis is /penhouse command
(no its not)
Reply
#2

Ask in this scripts topic.
Reply
#3

Quote:
Originally Posted by _Xerxes_
Ask in this scripts topic.
well no

P.S Anyone know?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)