18.02.2011, 21:14
(
Последний раз редактировалось Ponchik; 18.02.2011 в 22:10.
)
MoveObject returns incorrect value, its big than need to be
you can test it by this
difference about 6 seconds
if you will use more, than X+60 you will see more difference
you can test it by this
Код:
forward Destroy(playerid, object); public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/MoveObject", cmdtext, true, 11) == 0) { new object, time, Float:X, Float:Y, Float:Z, string[128]; GetPlayerPos(playerid, X, Y, Z); object = CreateObject(4639, X+3, Y, Z, 0, 0, 0); time = MoveObject(object, X+60, Y, Z, 1); format(string, sizeof(string), "Object will finish moving in %d milliseconds", time); SendClientMessage(playerid, 0x00FF00FF, string); SetTimerEx("Destroy", time, false, "ii", playerid, object); return 1; } return 0; } public Destroy(playerid, object) { SendClientMessage(playerid, 0x00FF00FF, "moving finished"); DestroyObject(object); }
if you will use more, than X+60 you will see more difference