Making a gate for a certain username only?
#2

Something like this?

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;
}
EDIT: Do you want a command to make some one the owner of the gate aswell?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)