29.01.2010, 18:16
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_SUBMISSION)
{
if(IsPlayerInRangeOfPoint(playerid, 10.0, 1596.950439, -1638.030151, 12.927757))
{
if(Gates[objectid] == 0)
{
Gates[objectid] = 1;
SendClientMessageToAll(0xFF8040FF, "LSPD Gates Opening");
MoveObject(LSGATE, 1589.042725, -1638.030151, 12.927757, 2);
}
}
}
else if (newkeys & KEY_JUMP)
{
if(IsPlayerInRangeOfPoint(playerid, 10.0, 1596.950439, -1638.030151, 12.927757))
{
if(Gates[objectid] == 1)
{
Gates[objectid] = 0;
SendClientMessageToAll(0xFF8040FF, "LSPD Gates Closing");
MoveObject(LSGATE, 1596.950439, -1638.030151, 12.927757, 2);
}
}
}
return 1;
}
I know playerid and vehicleid but first time ever with objectid