24.06.2011, 11:04
Is there a function which would rotate the object all the time? in circle. I saw it on a server, but dunno the function...
There's an include for that I believe, it's somewhere on the forums...
Anyway, here are some: https://sampforum.blast.hk/showthread.php?tid=151452 https://sampforum.blast.hk/showthread.php?tid=75493 https://sampforum.blast.hk/showthread.php?tid=85841 |
forward RotateMyObject(); OnGameModeInit() { [...] SetTimer("RotateMyObject", 10, true); //call rotatemyobject every 10 milliseconds, might wanna save the timer if you want to stop this someday [...] } public RotateMyObject() { new Float:rx, Float:ry, Float:rz; GetObjectRot(yourObjectID, rx, ry, rz); rz += 0.2; //how fast you wanna turn it every 10 ms if (rz >= 360) rz -= 360; SetObjectRot(yourObjectID, rx, ry, rz); return 1; }