06.01.2014, 21:39
Quote:
Код:
/* Wherever the object is created */ new GateObject = CreateDynamicObject(1095, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 200.0); public AirportGate() { if(!GateOpened) { MoveDynamicObject(GateObject, 0.0, 0.0, 0.0, 1, 90.0, 0.0, 0.0); //opened location SetTimer("AirportGate", 6000, false); GateOpened = true; } else { MoveDynamicObject(GateObject, 0.0, 0.0, 0.0, 1, 90.0, 0.0, 0.0); //closed location GateOpened = false; } } |
Код:
CMD:checkme(playerid, params[]) { if(!IsPlayerInRangeOfPoint(playerid, 10.0, 1960.4540,-2188.0190,13.5469)) { SendClientMessage(playerid, COLOR_RED, "You are not near the airport!"); } else { SendClientMessage(playerid, COLOR_GREEN, "Please wait while the airport security checks your vehicle and registration."); if(PlayerInfo[playerid][pCarLic] != 1) { if(PlayerInfo[playerid][pSex] == 1) { SendClientMessage(playerid, COLOR_WHITE, "Secruity Guard: Sir, you do not have a drivers license, the police have been informed and are on their way."); } else { SendClientMessage(playerid, COLOR_WHITE, "Secruity Guard: Ma'am, you do not have a drivers license, the police have been informed and are on their way."); } } else if(PlayerInfo[playerid][pFlyLic] != 1) { if(PlayerInfo[playerid][pSex] == 1) { SendClientMessage(playerid, COLOR_WHITE, "Secruity Guard: Sir, you do not have a flying license, the police have been informed and are on their way to question you."); } else { SendClientMessage(playerid, COLOR_WHITE, "Secruity Guard: Ma'am, you do not have a flying license, the police have been informed and are on their way to question you."); } } else { SendClientMessage(playerid, COLOR_WHITE, "Secruity Guard: Ok, you are free to enter the airport, have a wonderful day!(Gate will close in 6 seconds.)"); SetTimer("AirportGate", 200, 0); MoveDynamicObject(GateObject, 1956.54541, -2189.80908, 13.32070, 0.00000, 0.00000, 0.00000); } } return 1; } public AirportGate(playerid) { MoveDynamicObject(GateObject, 1956.54541, -2189.80908, 13.32070, 0.00000, 90.00000, 0.00000); }