Garsino House System - help
#4

Ok. I made this:

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(newkeys == KEY_SECONDARY_ATTACK)
	{new h = GetClosetHouseIntID(playerid);
	if(h == -1) return 1;
	    if(IsPlayerInRangeOfPoint(playerid, 2.0, House[h][ExitX],House[h][ExitY],House[h][ExitZ]))
	    {


		SetPlayerPos(playerid,House[h][EnterX],House[h][EnterY],House[h][EnterZ]);
		SetPlayerInterior(playerid,0);
		SetPlayerVirtualWorld(playerid,0);
		return 1;
		}
	}
	if(newkeys == KEY_SECONDARY_ATTACK)
	{        new h = GetClosetHouseID(playerid);
	if(h == -1) return 1;
	if(IsPlayerInRangeOfPoint(playerid, 2.0, House[h][EnterX],House[h][EnterY],House[h][EnterZ]))
	{

        
		if(House[h][On_Sell] == 0 && House[h][Lock] == 0)
		{
  			SetPlayerPos(playerid,House[h][ExitX],House[h][ExitY],House[h][ExitZ]);
  			SetPlayerInterior(playerid,House[h][IntID]);
  			SetPlayerVirtualWorld(playerid,House[h][VW]);
		}
		else return SCM(playerid,COLOR_RED,"EROR: "COL_WHITE"House is locked/Is not on sale.");
		if(strcmp(House[h][Owner],GetName(playerid),false) == 0)
		{
		new Year, Month, Day;
		getdate(Year, Month, Day);
		House[h][DayEnter] = Day;
	 	House[h][MonthEnter] = Month;
		CheckHouse(h);
		}
		return 1;
		}
}

	return 1;
}
It works me only for the first case when I want to get out of the house, but when I want to get in the house it wont work....
Reply


Messages In This Thread
Garsino House System - help - by Saddin - 30.12.2012, 08:06
Re: Garsino House System - help - by ikbenremco - 30.12.2012, 09:21
Re: Garsino House System - help - by Threshold - 30.12.2012, 09:56
Re: Garsino House System - help - by Saddin - 30.12.2012, 11:20
Re: Garsino House System - help - by Threshold - 30.12.2012, 22:21
Re: Garsino House System - help - by Saddin - 31.12.2012, 21:56

Forum Jump:


Users browsing this thread: 2 Guest(s)