Using TAB to open my gate.
#9

Код:
On top of the script:
new bool:GateOpen;

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 2)
	{
	  if (newkeys & KEY_FIRE)
	  {
        if(GateOpen == true)
        {
          MoveObject(modoor, 353.2448,165.5032,1026.3500, 3.5000);//close
          GateOpen = false;
        }
        else
        {
          MoveObject(modoor, 351.7448,165.5032,1026.3500, 3.5000);//open
          GateOpen = true;
        }
      }
	}
	return 1;
}
That bracket. And this should work 100%
Reply


Messages In This Thread
Using TAB to open my gate. - by Shellegg - 04.04.2009, 12:05
Re: Using TAB to open my gate. - by Lastman - 04.04.2009, 12:18
Re: Using TAB to open my gate. - by MenaceX^ - 04.04.2009, 12:20
Re: Using TAB to open my gate. - by dre$tA - 04.04.2009, 12:21
Re: Using TAB to open my gate. - by Shellegg - 04.04.2009, 12:22
Re: Using TAB to open my gate. - by dre$tA - 04.04.2009, 12:24
Re: Using TAB to open my gate. - by HB - 04.04.2009, 12:54
Re: Using TAB to open my gate. - by kevinsoftware - 04.04.2009, 13:25
Re: Using TAB to open my gate. - by Lastman - 04.04.2009, 13:28
Re: Using TAB to open my gate. - by Basssss - 04.04.2009, 13:45

Forum Jump:


Users browsing this thread: 1 Guest(s)