15.12.2014, 16:55
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.
Thanks,
FunnyBear
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;
}
}
FunnyBear