Having trouble opening the gate.
#1

I created a gate and made it so you press "F" it opens, but it only open if you hold F.
Код:
if(newkeys & 16)// at lv houses
    {
    	if(IsPlayerInRangeOfPoint(playerid, 2.0, 1574.45000000,666.05000000,11.31000000))//
     	{
    		if(checkgate[playerid] == 0)
			{   
				MoveObject(housegate, 1567.17000000,663.53000000,6.37000000,  2.0);
				GameTextForPlayer(playerid, "Gate ~g~opening", 5000, 6);
  				PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
       			ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 10.0, 0, 0, 0, 0, 0);
   				checkgate[playerid]=1;
			}
		}
	}
	else
	{
		if(checkgate[playerid] == 1)
		{
			MoveObject(housegate, 1567.18000000,663.51000000,12.47000000, 2.0);
			GameTextForPlayer(playerid, "Gate ~r~closing", 5000, 6);
			checkgate[playerid]=0;
			PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
			ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 10.0, 0, 0, 0, 0, 0);
		}
	}
        return 1;
}
Reply


Messages In This Thread
Having trouble opening the gate. - by TheYoungCapone - 10.12.2011, 17:34
Re: Having trouble opening the gate. - by TheYoungCapone - 12.12.2011, 01:16
Re: Having trouble opening the gate. - by JamesC - 12.12.2011, 02:45

Forum Jump:


Users browsing this thread: 2 Guest(s)