29.08.2017, 22:09
How I can open barrier like this?
How doesn't it work? What happens?
(If you're using dynamic objects, use MoveDynamicObject.) |
// This is the Gates System with aumomatic Gates // This filterscript is made by >>>((( Joksa )))<<< #include <a_samp> new lspdg; new pdgate1; forward GateClose(playerid); #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Gates System by Joksa >>>Is Loaded<<<"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } #else main() { print("\n----------------------------------"); print(" Gates System by Joksa >>>Is Loaded<<<"); print("----------------------------------\n"); } #endif public OnGameModeInit() { pdgate1 = CreateObject(968,1544.6992188,-1623.8994141,13.0000000,0.0000000,88.0000000,265.9982300); // The gate is the PD garage return 1; } public OnGameModeExit() { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/po", cmdtext, true, 10) == 0) { if(IsPlayerInRangeOfPoint(playerid, 15,1544.5923,-1627.1566,13.382)) // The gate is the PD garage { if(lspdg == 1) { SendClientMessage(playerid, 0xFF000000, "** The door is already open!"); return 1; } MoveObject(pdgate1,1544.6992188,-1623.8994141,13.0000000,25.0,0.0000000,8.0000000,265.9982300); SendClientMessage(playerid, 0xFF000000,"The door to the garage open, after 7 seconds it will automatically be lowered."); SetTimer("GateClose", 7000, 0); } return 1; } return 0; } public GateClose(playerid) { MoveObject(pdgate1, 1544.6992188,-1623.8994141,13.0000000,25.0,0.0000000,88.0000000,265.9982300); // The gate is the PD garage PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960); lspdg = 0; return 1; }