06.08.2015, 22:35
(
Последний раз редактировалось xVIP3Rx; 07.08.2015 в 07:21.
)
Solved, Every attempt to help is appreciated.
SetObjectPos(objectid, Float:X, Float:Y, Float:Z)
SetObjectRot(objectid, Float:RotX, Float:RotY, Float:RotZ)
MoveObject_Fix(...)
{
if(lastmove[objectid])
fZ += 0.00001;
else
fZ -= 0.00001;
lastmove[objectid] = !lastmove[objectid];
return MoveObject(...);
}
//ALS hook here (MoveObject = MoveObject_Fix)
I apologize for not describing the problem well, if you try it it'll:
work for the first time, then if you click on save, and try to move it anywhere again it'll move the object to a totally different place (close to the actual one) with another rotation.., (object used: 19313) I'll try to hook it as you did and see what happens though. |
Solved, got a different question now, what should be returned on "OnObjectMoved" and "OnPlayerEditObject"
also does bool = !bool, just flip the values or something else ? |
I don't think either return value matters in those two functions. OnPlayerEdit* doesn't require a return value at all, I don't recall anything specific about OnObjectMoved's return value.
Yes, `bool = !bool;` does inverse the value. ALSO, NEVER REMOVE YOUR POSTS WHEN YOUR PROBLEM WAS SOLVED! What if other people came here to fix their problem? They wouldn't be able to rely on your thread because you deleted everything important and didn't share your solution. |
public OnObjectMoved(objectid)
{
if(objectid != gFerrisWheel) return 0;
SetTimer("RotateWheel",3*1000,0);
return 1;
}