Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- addEventHandler('onClientResourceStart', resourceRoot,
- function()
- cube = createObject ( 18095, 5477, -1677, 0, 0, 0, 0 )
- outputChatBox ( "The cube will start to move in 30 seconds!")
- local txd = engineLoadTXD('cube.txd')
- engineImportTXD(txd, 18095)
- local col = engineLoadCOL('cube.col')
- engineReplaceCOL(col, 18095)
- local dff = engineLoadDFF('cube.dff', 0)
- engineReplaceModel(dff, 18095)
- setTimer ( move, 30000, 1 )
- end
- )
- function move ()
- local x, y, z = getElementPosition ( cube )
- local rotx, roty, rotz = getElementRotation ( cube )
- local way1 = { x+30, y, z, rotx, roty+90, rotz }
- local way2 = { x, y-30, z, rotx+90, roty, rotz }
- local way3 = { x-30, y, z, rotx, roty-90, rotz }
- local way4 = { x, y+30, z, rotx-90, roty, rotz }
- local randomway = math.random(1,4)
- moveObject ( cube, 8000, way[randomway][1],way[randomway][2],way[randomway][3],way[randomway][4],way[randomway][5],way[randomway][6])
- setTimer ( move, 11000, 1 )
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement