01.11.2009, 20:18
Quote:
Originally Posted by yugokoral
What about this code i had:
Код:
forward CheckGate(); public CheckGate() { for(new i = 0; i < GetMaxPlayers(); i++) { if(!IsPlayerConnected(i)) continue; if(PlayerToPoint(10.0, i, 213.8831,1875.3693,13.1470)) { MoveObject(a51_desna,207.838668,1875.358276,13.885452,1.0); MoveObject(a51_leva,219.970260,1875.358276,13.885452,1.0); return 1; } } MoveObject(a51_desna,211.854766,1875.358276,13.885452,1.0); MoveObject(a51_leva,215.952407,1875.358276,13.885452,1.0); return 1; } |
pawn Код:
forward CheckGate();
public CheckGate()
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(!IsPlayerConnected(i)) continue;
if(PlayerToPoint(10.0, i, 213.8831,1875.3693,13.1470))
{
MoveObject(a51_desna,207.838668,1875.358276,13.885452,1.0);
MoveObject(a51_leva,219.970260,1875.358276,13.885452,1.0);
}
else
{
MoveObject(a51_desna,211.854766,1875.358276,13.885452,1.0);
MoveObject(a51_leva,215.952407,1875.358276,13.885452,1.0);
}
}
return 1;
}