16.01.2010, 08:54
on top of the script:
OnFilterScriptInit / OnGameModeInit:
On the bottom of your script:
pawn Код:
new gate;
pawn Код:
gate = CreateObject(986,-302.628,1507.450,76.070,0.0,0.0,0.0);
pawn Код:
forward CheckGate();
public CheckGate()
{
for(new i = 0; i < GetMaxPlayers(); i++) {
if(!IsPlayerConnected(i)) continue;
if(IsPlayerInRangeOfPoint(i, 10.0, -302.628,1507.450,76.070) && OpenGate[i] == 0) {
MoveObject(gate,-293.828,1507.450,76.070,10);
OpenGate[i] = 1;
}
else if(!IsPlayerInRangeOfPoint(i, 10.0, -302.628,1507.450,76.070) && OpenGate[i] == 1) {
MoveObject(gate,-302.628,1507.450,76.070,10);
OpenGate[i] = 0;
}
}