Search the Community
Showing results for tags 'move objects'.
-
Hey guys. I'm new to lua. I found a way to move objects from server side. But when I upload it to the server it doesn't work. Because server doesn't support server side scripting. So can you guys please tell me how to move an object from client side. So can you please provide me a full script which can move an object from client. Thank you. function omg_brigemove() omg3228 = createObject(3095, 1779.900390625, -7523, 0, 0, 0, 0) omgMoveomg3228(1) omg3604 = createObject(994, 1776.7001953125, -7527.3999023438, 0.60000002384186, 0, 0, 0) omgMoveomg3604(1) omg7312 = createObject(994, 1776.6999511719, -7518.6499023438, 0.60000002384186, 0, 0, 0) omgMoveomg7312(1) end function omgMoveomg3228(point) if point == 1 then moveObject(omg3228, 2000, 1779.9000244141, -7491.7001953125, 0, 0, 0, 0) setTimer(omgMoveomg3228, 2000, 1, 2) elseif point == 2 then moveObject(omg3228, 2000, 1779.900390625, -7523, 0, 0, 0, 0) setTimer(omgMoveomg3228, 2000, 1, 1) end end function omgMoveomg3604(point) if point == 1 then moveObject(omg3604, 2000, 1776.7001953125, -7496, 0.60000002384186, 0, 0, 0) setTimer(omgMoveomg3604, 2000, 1, 2) elseif point == 2 then moveObject(omg3604, 2000, 1776.7001953125, -7527.3999023438, 0.60000002384186, 0, 0, 0) setTimer(omgMoveomg3604, 2000, 1, 1) end end function omgMoveomg7312(point) if point == 1 then moveObject(omg7312, 2000, 1776.7001953125, -7487.3999023438, 0.60000002384186, 0, 0, 0) setTimer(omgMoveomg7312, 2000, 1, 2) elseif point == 2 then moveObject(omg7312, 2000, 1776.6999511719, -7518.6499023438, 0.60000002384186, 0, 0, 0) setTimer(omgMoveomg7312, 2000, 1, 1) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), omg_brigemove)