#include <a_samp>new bool:open = false, gate, timer;forward AutoCheck();public OnFilterScriptInit(){ timer = SetTimer(\"AutoCheck\", 2500, 1); gate = CreateObject(975, 265, 2353.1975, -1658.9237, 13.3828, 0, 0, 50); return 1;}public OnFilterScriptExit(){ KillTimer(timer); DestroyObject(gate); return 1;}public AutoCheck(){ new bool:o; for(new i = 0; i < GetMaxPlayers(); i++) if(IsPlayerConnected(i)) { if(IsPlayerInRangeOfPoint(i, 8.0,265,2353.1975,-1658.9237)) { o = true; if(!open) MoveObject(gate, 265,2351.9912,-1642.7017,14.6493,182.148, 5.0); break; } } if(!o && open) MoveObject(gate, 265,2353.1975,-1658.9237,13.3828,93.1845, 5.0); return 1;}
#include <a_samp>new bool:open = false,gate,timer;forward AutoCheck();public OnFilterScriptInit() { timer = SetTimer(\"AutoCheck\", 2500, 1); gate = CreateObject(975, 265, 2353.1975, -1658.9237, 13.3828, 0, 0, 50); return 1;}public OnFilterScriptExit() { KillTimer(timer); DestroyObject(gate); return 1;}public AutoCheck() { new bool:o; for(new i = 0; i < GetMaxPlayers(); i++) if(IsPlayerConnected(i)) { if(IsPlayerInRangeOfPoint(i, 8.0,2353.1975,-1658.9237, 13.3828)) { o = true; if(!open) MoveObject(gate, 2351.9912,-1642.7017,14.6493, 5.0); break; } } if(!o && open) MoveObject(gate, 2353.1975,-1658.9237,13.3828, 5.0); return 1;}