Otto Posted December 10, 2011 Posted December 10, 2011 I was thinking on a script just for move the head of the ped while he moves the mouse. Imagine the human moves the mouse to the right, the ped will move it head to the right. Which functions should I use? Is it possible to do it? Is it already on the MTA files (Like on SAMP)?
12p Posted December 10, 2011 Posted December 10, 2011 I think there is a function for do that, not sure if it will work... setPedLookAt
CapY Posted December 10, 2011 Posted December 10, 2011 And you handle that function with 'onClientCursorMove' event.
myonlake Posted December 10, 2011 Posted December 10, 2011 https://community.multitheftauto.com/index.php?p= ... ils&id=990
Otto Posted December 10, 2011 Author Posted December 10, 2011 https://community.multitheftauto.com/index.php?p=resources&s=details&id=990 The point was: I do the script. I won't use this resource.
BinSlayer1 Posted December 10, 2011 Posted December 10, 2011 The point was: I do the script. I won't use this resource. Well then do it? You've been pointed into the right direction. setPedLookAt(localPlayer, x, y, z) and x,y,z can be gathered using onClientCursorMove's last 3 parameters https://wiki.multitheftauto.com/wiki/SetPedLookAt https://wiki.multitheftauto.com/wiki/OnClientCursorMove Script -> Clientside
Jaysds1 Posted December 10, 2011 Posted December 10, 2011 and dont forget to use addEventHandler("onClientRender",getRootElement(),lookAt)
BinSlayer1 Posted December 10, 2011 Posted December 10, 2011 and dont forget to use addEventHandler("onClientRender",getRootElement(),lookAt) why? all he needs to do is set the ped look at when the mouse moves around..
NotAvailable Posted December 10, 2011 Posted December 10, 2011 and dont forget to use addEventHandler("onClientRender",getRootElement(),lookAt) why? all he needs to do is set the ped look at when the mouse moves around.. If you want a smooth movement use onClientPreRender
BinSlayer1 Posted December 10, 2011 Posted December 10, 2011 and dont forget to use addEventHandler("onClientRender",getRootElement(),lookAt) why? all he needs to do is set the ped look at when the mouse moves around.. If you want a smooth movement use onClientPreRender actually, onClientCursorMove will provide the smoothness. No need for render events
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now