MoveObject Automatically
#1

How can I make a object, move automatically, without using a command like /open blablabla.
Because I already know how to do that, but now I would like to make a moving container, between 2 ships, its in a DM zone. Offcourse you cant keep writing '/move container' all the time when you're in a dm zone, so i would like to make this move between 2 coordinates, 3043.60839844,1032.44091797,18.58981705 and 3092.70214844,1016.84442139,18.58981705. Moving back and forth without a command.

Is this possible? if yes, how?
Reply
#2

pawn Code:
if(IsPlayerInRangeOfPoint(playerid, Float:Range, Float:X, Float:Y, Float:Z)
{
MoveObject(YourVariable, X, Y, Z);
}
Reply
#3

Is it synced? Because I made this container so people can jump on it and go to the other side of the dm zone (ship).
Reply
#4

And does it move back and forth between the coordinates with this command? Or does it only move once?
Reply
#5

pawn Code:
if(IsPlayerInRangeOfPoint(playerid, Float:Range, Float:X, Float:Y, Float:Z)
{
    for(new i, Max = GetMaxPlayers(); i < Max; i++)
    {
        MoveObject(i, YourVariable, X, Y, Z); // Open.
        }else{
        MoveObject(i, YourVariable, X, Y, Z); // Close.
    }
}
I think it should working.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)