Help Just 2 Simple auto gates
#7

Here's for the first one.
pawn Код:
#include <a_samp>
new FirstGate;
public OnGameModeInit()
{
    FirstGate = CreateObject(980, 2497.20508, 2779.04443, 12.34830, 0.00000, 0.00000, 90.00000);
    SetTimer("OpenGateAuto", 1000, 1);
}
forward OpenGateAuto();
public OpenGateAuto()
{
    new open;
    for(new i=GetMaxPlayers(); i > -1; i--)
    {
        if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i, 7.0, 2497.20508, 2779.04443, 12.34830))
        {
            open = 1;
            MoveObject(FirstGate, 2497.20508, 2779.04443, 17.56272, 3.0);
            break;
        }
    }
    if(!open)
        MoveObject(FirstGate, 2497.20508, 2779.04443, 12.34830, 3.0);
}
Just do the same for the second, and you'll be alright.
Auto gate with speed 3, and you need to be in range of 7 meters.
Reply


Messages In This Thread
Help Just 2 Simple auto gates - by donhu789 - 24.09.2013, 15:00
Re: Help Just 2 Simple auto gates - by donhu789 - 24.09.2013, 15:05
Re: Help Just 2 Simple auto gates - by Voxel - 24.09.2013, 15:05
Re: Help Just 2 Simple auto gates - by donhu789 - 24.09.2013, 15:07
Re: Help Just 2 Simple auto gates - by donhu789 - 24.09.2013, 15:09
Re: Help Just 2 Simple auto gates - by XStormiest - 24.09.2013, 15:23
Re: Help Just 2 Simple auto gates - by JimmyCh - 24.09.2013, 15:28
Re: Help Just 2 Simple auto gates - by donhu789 - 25.09.2013, 04:11
Re: Help Just 2 Simple auto gates - by donhu789 - 25.09.2013, 04:13
Re: Help Just 2 Simple auto gates - by JamesH - 25.09.2013, 05:02

Forum Jump:


Users browsing this thread: 1 Guest(s)