Otto Posted December 10, 2011 Share 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)? Link to comment
12p Posted December 10, 2011 Share Posted December 10, 2011 I think there is a function for do that, not sure if it will work... setPedLookAt Link to comment
CapY Posted December 10, 2011 Share Posted December 10, 2011 And you handle that function with 'onClientCursorMove' event. Link to comment
myonlake Posted December 10, 2011 Share Posted December 10, 2011 https://community.multitheftauto.com/index.php?p= ... ils&id=990 Link to comment
Otto Posted December 10, 2011 Author Share 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. Link to comment
CapY Posted December 10, 2011 Share Posted December 10, 2011 Then do a server side too. Link to comment
BinSlayer1 Posted December 10, 2011 Share 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 Link to comment
Jaysds1 Posted December 10, 2011 Share Posted December 10, 2011 and dont forget to use addEventHandler("onClientRender",getRootElement(),lookAt) Link to comment
BinSlayer1 Posted December 10, 2011 Share 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.. Link to comment
NotAvailable Posted December 10, 2011 Share 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 Link to comment
BinSlayer1 Posted December 10, 2011 Share 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 Link to comment
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