Rotating object.
#2

UNTESTED

Will make coffin move for 7 times
pawn Код:
new objecttimer[100];
CMD:object(playerid, params[])
{
    new Float:XYZ[3];
    GetPlayerPos(playerid, XYZ[0], XYZ[1], XYZ[2]);
    Coffin[playerid] = CreateObject(2896, XYZ[0], XYZ[1], XYZ[2], 0, 0, 0, 100.0);
    new time;
    time = MoveObject(Coffin[playerid], XYZ[0], XYZ[1], XYZ[2]+0.0001, 0.0001, 0.0, 0.0, 180.0);
    objecttimer[Coffin[playerid]] = SetTimerEx("movecoffin",time,true,"i",playerid);
    return 1;
}

forward movecoffin(playerid);
new timescoffinrotated=0;
public movecoffin(playerid)
{
   ++timescoffinrotated;
    MoveObject(Coffin[playerid], XYZ[0], XYZ[1], XYZ[2]+0.0001, 0.0001, 0.0, 0.0, 180.0);
    if( timescoffinrotated == 7) KillTimer(objecttimer[Coffin[playerid]]);

    return 1;
}
Reply


Messages In This Thread
Rotating object. - by Dan. - 24.07.2012, 11:48
Re: Rotating object. - by [MM]RoXoR[FS] - 24.07.2012, 12:01
Re: Rotating object. - by Dan. - 24.07.2012, 12:37

Forum Jump:


Users browsing this thread: 1 Guest(s)