Automatically moving object
#7

pawn Код:
// Top
new
    theObject;

// Gamemode Init
theObject = CreateObject(...);
MoveObject(theObject, ...);

// Anywhere else
forward @MoveObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed);
@MoveObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed) return MoveObject(objectid, X, Y, Z, Speed);

public OnObjectMoved(objectid)
{
    new rand = 1000 * random(10); // how many seconds between moving? (10)
    SetTimerEx("@MoveObject", rand, 0, "dffff", objectid, /* insert x, y, z */, 3.0);
    return 1;
}
Reply


Messages In This Thread
Automatically moving object - by P<3TS - 26.07.2012, 10:03
Re: Automatically moving object - by Matz - 26.07.2012, 10:06
Re: Automatically moving object - by Alexis1999 - 26.07.2012, 10:13
Re: Automatically moving object - by P<3TS - 26.07.2012, 10:21
Re: Automatically moving object - by Stigg - 26.07.2012, 10:22
Re: Automatically moving object - by P<3TS - 26.07.2012, 10:25
Re: Automatically moving object - by Vince - 26.07.2012, 10:40
Re: Automatically moving object - by P<3TS - 26.07.2012, 11:15
Re: Automatically moving object - by P<3TS - 26.07.2012, 13:13
Re: Automatically moving object - by P<3TS - 27.07.2012, 17:18

Forum Jump:


Users browsing this thread: 2 Guest(s)