#include <a_samp>
new kapu;
public OnFilterScriptInit()
{
kapu = CreateObject(, );
SetTimer(\"timerbezaras\", 1000, 1);
}
forward timerbezaras();
public timerbezaras()
{
new open;
for(new i=GetMaxPlayers(); i > -1; i--)
{
if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i, 3.0, , , ))
{
open = 1;
MoveObject(kapu, , 2.0);
break;
}
}
if(!open)
MoveObject(kapu, , , , 2.0);
}