Auto Gates on Car Beep *horn H*
#6

Quote:
Originally Posted by Naruto4
Thanks mate.(working on it,i let you know if it works)
Whilst you were working on it, i also was working on it before your post. Since i've made it, might as well post it.

pawn Код:
#define KEY_HORN 2

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (newkeys & KEY_HORN) // If the player is pressing the horn key.
    {
        if(PlayerToPoint(10.0, i, 2237.188965, 2448.813232, 9.845795) && HasPGP[i] == 1)
        {
          new sendername[24],string[128];
            GetPlayerName(playerid,sendername, sizeof(sendername));
            format(string, sizeof(string), "%s pushes a button in his pocket to open the HQ Gate.", sendername);
            SendClientMessageToAll(0x00E100FF, string);
            MoveObject(pdgateLV, 2237.127930, 2458.059570, 9.840160, 3.5); //open the gate
            SetTimer(CloseGate, 7000, 0);
        }
    }
    return 1;
}

forward CloseGate();
public CloseGate()
{
    MoveObject(pdgateLV, 2237.188965, 2448.813232, 9.845795, 3.5); // close the gate
    return 1;
}
Note: You will need to get rid of your "NearGatelv" timer, it's not needed seen as you are using the horn. Untested.
Reply


Messages In This Thread
Auto Gates on Car Beep *horn H* - by Naruto4 - 21.11.2009, 10:29
Re: Auto Gates on Car Beep *horn H* - by [LCG]TANKER - 21.11.2009, 12:46
Re: Auto Gates on Car Beep *horn H* - by Naruto4 - 21.11.2009, 15:46
Re: Auto Gates on Car Beep *horn H* - by Rzzr - 21.11.2009, 15:49
Re: Auto Gates on Car Beep *horn H* - by Naruto4 - 21.11.2009, 15:59
Re: Auto Gates on Car Beep *horn H* - by member - 21.11.2009, 16:03
Re: Auto Gates on Car Beep *horn H* - by Naruto4 - 21.11.2009, 16:06
Re: Auto Gates on Car Beep *horn H* - by member - 21.11.2009, 16:13
Re: Auto Gates on Car Beep *horn H* - by Naruto4 - 21.11.2009, 16:16
Re: Auto Gates on Car Beep *horn H* - by member - 21.11.2009, 16:21

Forum Jump:


Users browsing this thread: 1 Guest(s)