30.11.2009, 18:56
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
https://sampwiki.blast.hk/wiki/GetPlayerKeys#Key_List
https://sampwiki.blast.hk/wiki/GetPlayerKeys#Key_List
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_SUBMISSION)
{
if (PlayerToPoint(30.0, playerid, x, y, z of gate))
{
MoveObject(gate1, x, y, z of the opened gate);
SetTimer("CloseGate", 10000, false);
}
}
return 1;
}
forward CloseGate();
public CloseGate()
{
MoveObject(gate1, x, y, z of the closed gate);
}