Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #define FILTERSCRIPT
- #define MOVE_TIME 1000//The interval before the objects will move
- new Object[2];
- new ObjectTimer;
- new ObjectPos;
- public OnFilterScriptInit()
- {
- Object[0] = CreateObject(3115, 834.58679199219, -2077.3247070313, 11.756024360657, 0.0, 0.0, 0.0);
- Object[1] = CreateObject(3115, 834.35845947266, -2116.4672851563, 5.5060243606567, 0.0, 0.0, 0.0);
- ObjectTimer = SetTimer("ObjectMover", MOVE_TIME, 1);
- return 1;
- }
- public OnFilterScriptExit()
- {
- KillTimer(ObjectTimer);
- return 1;
- }
- forward ObjectMover();
- public ObjectMover()
- {
- if(ObjectPos == 0)//If the objects are in the 1st position
- {
- MoveObject(Object[0], 834.35845947266, -2116.4672851563, 5.5060243606567, 1.0);
- MoveObject(Object[1], 834.58679199219, -2077.3247070313, 11.756024360657, 1.0);
- }
- else//If the objects are in the 2nd position
- {
- MoveObject(Object[0], 834.58679199219, -2077.3247070313, 11.756024360657, 1.0);
- MoveObject(Object[1], 834.35845947266, -2116.4672851563, 5.5060243606567, 1.0);
- }
- }
- public OnObjectMoved(objectid)//And this function shows us where are the objects (1st/2nd)
- {
- if(ObjectPos == 0) ObjectPos = 1;
- else ObjectPos = 0;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment