Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sH, sW = guiGetScreenSize()
- x_prev = nil
- function setPrevX()
- x, _ = getCursorPosition ()
- x_prev = x*sW
- end
- function girarpj()
- if getKeyState ("mouse2") then
- x, _ = getCursorPosition ()
- x=x*sW
- change_rot = (x-x_prev)
- local _, _, ped_rot = getElementRotation ( Jugador )
- local rot_to = ped_rot+change_rot
- if rot_to < 0 then
- rot_to = ped_rot+change_rot+360
- end
- setElementRotation ( Jugador, 0, 0, rot_to )
- x_prev = x
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement