pawn Код:
airportg = CreateObject(980,2061.5000000,2437.5000000,11.1000000,0.0000000,0.0000000,0.0000000); //Closed
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if ((newkeys & KEY_YES) && !(oldkeys & KEY_YES)) // OPENING DOORS OR GATES *************************************************
{
if(IsPlayerInRangeOfPoint(playerid, 10.0,2061.5000000,2437.5000000,11.1000000)) //lspd garage door
{
if(AirportGateOwner[playerid] == 1)
{
MoveDynamicObject(airportg, 2061.5000000,2437.5000000,7.1000000, 2.00); //lspd garage door
}
}
}
if ((newkeys & KEY_NO) && !(oldkeys & KEY_NO)) // CLOSING DOORS OR GATES **************************************************
{
if(IsPlayerInRangeOfPoint(playerid, 10.0,2061.5000000,2437.5000000,7.1000000)) //lspd garage door
{
if(AirportGateOwner[playerid] == 1)
{
MoveDynamicObject(airportg, 2061.5000000,2437.5000000,11.1000000, 2.00); //lspd garage door
}
}
}
return 1;
}