06.09.2009, 22:35
Код:
public GateOpen() { for(new i = 0; i <MAX_PLAYERS; i++) { if(GetPlayerState(i) == PLAYER_STATE_ONFOOT) { new tmp = GetPlayerSkin(i); if((tmp == GIRL_COP) || (tmp == OFFICER) || (tmp == CORP_SERG) || (tmp == LUIT_CAPT) || (tmp == DC) || (tmp == CHIEF) || (tmp == SWAT)) { if(PlayerToPoint(5.0,i,2336.966308,2447.072021,4.928408)) { MoveObject(Gates[pdMain],2333.097412,2440.264160,4.922060, 3);//LVPD Main Gate SetTimerEx("GateClose", 3000, false, "%d", 1); } else if(PlayerToPoint(5.0,i,2294.478027,2492.833007,6.589216)) { MoveObject(Gates[pdDoor],2294.478027,2492.833007,12.589216, 3);//Gate doorway SetTimerEx("GateClose", 3000, false, "%d", 3); } } } } return true; } public GateClose(Gate) { if(Gate == 1) return MoveObject(Gates[pdMain],2336.966308,2447.072021,4.928408, 2.5); //Main Gate Closed if(Gate == 2) return MoveObject(Gates[pdSide],2294.194091,2495.034423,2.431484, 2.5); //Side Gate Closed if(Gate == 3) return MoveObject(Gates[pdDoor],2294.478027,2492.833007,6.589216, 2.5); //Gate doorway if(Gate == 4) return SetObjectRot(Gates[pdElevator],0.00,89.75,89.97); //Elevator Gate closed return true; }