30.12.2015, 13:48
i have this but gate 2 not works.how to fix it?
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) return;
if(areagate1o == false)
{
MoveObject(areagate1, 121.6021, 1941.5845, 21.6600, 5);
areagate1o = true;
}
return;
}
else if(IsPlayerInRangeOfPoint(i, 15, 205.4922, 1730.3516, 17.8281))
{
if(gTeam[i] != TEAM_Internationalforces) return;
if(areagate2o == false)
{
MoveObject(areagate2, 286.0697, 1833.7720, 19.9611, 5);
areagate2o = true;
}
return;
}
return;
}
if(areagate1o == true)
{
MoveObject(areagate1, 134.7061, 1941.5814, 21.6600, 5);
areagate1o = false;
return;
}
if(areagate2o == true)
{
MoveObject(areagate2, 205.4922, 1730.3516, 17.8281, 5);
areagate2o = false;
return;
}
return;
}