Gate only opens for one player
#1

Hey,

I have a problem with my Gate for my Swat Base. The gate opens fine automatically, but it only opens the gate for one player in the Swat team. And that player is usually the first to spawn as a swat player.

So instead of opening it for any Swat Player that goes nearby, it only opens for one of the swat player.

pawn Код:
forward GateCheck( playerid );
public GateCheck( playerid )
{
    if ( gTeam[ playerid ] == TEAM_SWAT )
    {
        if(IsPlayerInRangeOfPoint(playerid, 22.0, 1415.0000000, -1649.9000244, 16.2999992))
        {
            if(SwatOpen == false)
            {
                MoveDynamicObject(SwatGate, 1415.0999756, -1639.5000000, 16.2999992, 2.3);
                SwatOpen = true;
            }
            return;
        }
    }
    if(SwatOpen == true)
    {
        MoveDynamicObject(SwatGate, 1415.0000000, -1649.9000244, 16.2999992, 2.3); // Change the '8.0, 3.0, 10.0' to the coordinates of your gate when it's closed.    gateopen = false; //This indicates the gate is closed again. Or at least, closing.
        SwatOpen = false;
    }
}
Thanks,

FunnyBear
Reply


Messages In This Thread
Gate only opens for one player - by FunnyBear - 15.12.2014, 16:55
Re: Gate only opens for one player - by PinkFloydLover - 15.12.2014, 17:01
Re: Gate only opens for one player - by FunnyBear - 15.12.2014, 17:06
Re: Gate only opens for one player - by Raweresh - 15.12.2014, 17:47
Re: Gate only opens for one player - by FunnyBear - 15.12.2014, 19:10

Forum Jump:


Users browsing this thread: 1 Guest(s)