24.07.2012, 12:01
UNTESTED
Will make coffin move for 7 times
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;
}