05.03.2011, 16:33
Hi,
I'm testing some stuff for moving objects with a dozer vehicle.
I've created some rocks and I can move them by pushing them away with the dozer, but when I try to get the rock's current position, it returns the location where it was created and not where it is being pushed to.
Can anyone help me with this?
This code is used in a timer that runs every second.
It always sends me the coordinates where the rock has been created, instead of giving me the current position of the rock where I pushed it.
I'm testing some stuff for moving objects with a dozer vehicle.
I've created some rocks and I can move them by pushing them away with the dozer, but when I try to get the rock's current position, it returns the location where it was created and not where it is being pushed to.
Can anyone help me with this?
pawn Код:
// Get the current position of the rock as it might have been moved by the player already
GetObjectPos(RockID, Rockx, Rocky, Rockz);
format(Msg, 128, "RockX = %f, RockY = %f, RockZ = %f", Rockx, Rocky, Rockz);
SendClientMessage(playerid, 0xFFFFFFFF, Msg);
It always sends me the coordinates where the rock has been created, instead of giving me the current position of the rock where I pushed it.