01.02.2012, 19:39
pawn Код:
public CheckGate()
{
for(new i, m = GetMaxPlayers(); i < m; i++)
{
if (IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i, 5.00, 1325.0199,-1387.8572,13.6263))
{
if(IsPlayerInAnyVehicle(i))
{
MoveObject(Gate1, 1328.33, -1385.72, 13.25+0.0001, 0.0001, 0.0, 0.0, 0.0); //Nyilik
}
else
{
SendClientMessage(i, 0x00FF00AA, "You are not in any vehicle.");
}
}
else
{
MoveObject(Gate1, 1328.33, -1385.72, 13.25, 0.0001, 0.0, -90.0, 0.0); // Csukodik
}
if(IsPlayerInRangeOfPoint(i, 5.00, 1727.40, 1608.18, 8.91))
{
if(IsPlayerInAnyVehicle(i))
{
MoveObject(Gate2, 1722.76, 1611.90, 9.88+0.0001, 0.0001, 0.00, 0.00, 70.25); //Nyilik
}
else
{
SendClientMessage(i, 0x00FF00AA, "You are not in any vehicle.");
}
}
else
{
MoveObject(Gate2, 1722.76, 1611.90, 9.88, 0.0001, 0.00, -90.00, 70.25); // Csukodik
}
}
}
}
return 1;
}