20.02.2010, 21:45
Hey, I have a ufo for my server and i want it to keep going from car school to north sf.
Im not sure if my code works, i havent tested it, it should work
I want the object so when it goes to north sf, then back to car school, then it goes back to north sf, so it keeps doing it like that all the time.
Heres my code:
Im not sure if my code works, i havent tested it, it should work
I want the object so when it goes to north sf, then back to car school, then it goes back to north sf, so it keeps doing it like that all the time.
Heres my code:
pawn Код:
#include <a_samp>
new ufo;
public OnFilterScriptInit()
{
ufo = CreateObject(13607, -2058.7773, -198.6086, 98.033844, 0.0000, 0.0000, 0.0000);//car school
SetTimer("MoveUfo", 10000, false);//Move the ufo 10 seconds after filterscript loads
return 1;
}
forward MoveUfo();
public MoveUfo()
{
MoveObject(ufo, -2039.0299, 1325.1370, 98.033844, 2.5000);//Moves the ufo to north sf
return 1;
}
public OnObjectMoved(objectid)//This gets called after the "ufo" object has been moved
{
if(objectid = ufo)
{
MoveObject(ufo, -2058.7773, -198.6086, 98.033844, 2.5000);//Moves the ufo back to car school
}
return 1;
}