30.12.2015, 14:16
try this
PHP код:
forward areagatecheck();
public areagatecheck()
{
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i, 15, 134.7061, 1941.5814, 21.6600))
{
if(gTeam[i] == TEAM_Internationalforces)
{
if(areagate1o == false)
{
MoveObject(areagate1, 121.6021, 1941.5845, 21.6600, 5);
areagate1o = true;
}
}
}
if(IsPlayerInRangeOfPoint(i, 15, 205.4922, 1730.3516, 17.8281))
{
if(gTeam[i] == TEAM_Internationalforces)
{
if(areagate2o == false)
{
MoveObject(areagate2, 286.0697, 1833.7720, 19.9611, 5);
areagate2o = true;
}
}
}
if(!IsPlayerInRangeOfPoint(i, 15, 134.7061, 1941.5814, 21.6600))
{
if(areagate1o == true)
{
MoveObject(areagate1, 134.7061, 1941.5814, 21.6600, 5);
areagate1o = false;
}
}
if(!IsPlayerInRangeOfPoint(i, 15, 205.4922, 1730.3516, 17.8281))
{
if(areagate2o == false)
{
MoveObject(areagate2, 286.0697, 1833.7720, 19.9611, 5);
areagate2o = true;
}
}
}