Automata Kapu:D #define FILTERSCRIPT
#include <a_samp>
#include <a_objects>
#if defined FILTERSCRIPT
forward GateCheck(playerid);
new mygate;
public OnFilterScriptInit()
{
mygate=CreateObject(16775, 2063.2603, -2600.1406, 16.5461, 0.0000, 0.0000, 33.5180); //object (kapu) ID és a koordinata
SetTimer("GateCheck",1000,1);
return 1;
}
public GateCheck(playerid)
{
if(IsPlayerInRangeOfPoint(playerid,10.0,2063.2603, -2600.1406, 16.5461)) //object (kapu) koordinata
{
MoveObject(mygate, 2063.2507, -2600.1677, 8.5313, 6.00); //nyitott kapu koordinata a 6.00 a sebessége
}
else
{
MoveObject(mygate,2063.2603, -2600.1406, 16.5461, 6.00); //zárt kapu koordinata
}
}
#endif