12.02.2015, 17:11
PHP код:
forward GATECHECK();
public GATECHECK()
{
for(new x =-1; x < MAX_PLAYERS; x++)
{
if( IsPlayerInRangeOfPoint(x, 10.0, -874.09363, 1992.82996, 61.10401) && (tCP[DAM] == TEAM_NONE || tCP[DAM] == gTeam[x]))
{
MoveObject(DAMGATE11,-874.09363, 1992.82996, 61.10401-7.5, 2.5, 0.00000, 0.00000, 130.08006);
MoveObject(DAMGATE12,-868.90326, 1986.79724, 61.06929-7.5, 2.5, 0.00000, 0.00000, 131.40002);
}
else
{
MoveObject(DAMGATE11,-874.09363, 1992.82996, 61.10401, 2.5,0.00000, 0.00000, 130.08006);
MoveObject(DAMGATE12,-868.90326, 1986.79724, 61.06929, 2.5, 0.00000, 0.00000, 131.40002);
}
if( IsPlayerInRangeOfPoint(x, 10.0, -556.04486, 1999.05920, 60.82679) && (tCP[DAM] == TEAM_NONE ||tCP[DAM] == gTeam[x]))
{
MoveObject(DAMGATE21,-556.04486, 1999.05920, 60.82679-7.5, 2.5, 0.00000, 0.00000, -126.48004);
MoveObject(DAMGATE22,-551.18463, 2005.36987, 60.81766-7.5, 2.5, 0.00000, 0.00000, -128.46001);
}
else
{
MoveObject(DAMGATE21,-556.04486, 1999.05920, 60.82679, 2.5, 0.00000, 0.00000, -126.48004);
MoveObject(DAMGATE22,-551.18463, 2005.36987, 60.81766, 2.5, 0.00000, 0.00000, -128.46001);
}
}
return 1;
}