28.06.2014, 11:42
Hey!
I've been trying to bind the HORN button with my gate so whenever I horn it would open.
But it doesn't work while I'm driving or so. [You must stop before you horn in order it to open]
Code:
Thanks in advance!
I've been trying to bind the HORN button with my gate so whenever I horn it would open.
But it doesn't work while I'm driving or so. [You must stop before you horn in order it to open]
Code:
PHP код:
if(GetPlayerFaction(playerid) == COPS && newkeys == 2 && IsPlayerInAnyVehicle(playerid) && IsPlayerDriver(playerid))
{
if(IsPlayerInRangeOfPoint(playerid,20,1588.5000000,-1638.3000000,14.1000000))
{
switch(Gate1)
{
case true:
{
MoveObject(Gate[0],1598.5000000,-1638.3000000,14.1000000,5);
Gate1 = false;
}
case false:
{
MoveObject(Gate[0],1588.5000000,-1638.3000000,14.1000000,5);
Gate1 = true;
}
}
}
if(IsPlayerInRangeOfPoint(playerid,10,1544.7000000,-1630.8000000,13.1000000))
{
switch(Gate2)
{
case true:
{
SetTimer("pdcubegate7", 100, false);
SetTimer("ResetPD1",10000,0);
}
case false:
{
SetTimer("pdcubegate15", 100, false);
}
}
}
}