papam77 Posted July 20, 2013 Posted July 20, 2013 Hello how can make moving ped if is it possible i need to move him from XYZ to XYZ and then back to first XYZ
papam77 Posted July 20, 2013 Author Posted July 20, 2013 --------------------------------- -- DeeJay v2 -------------------- --------------------------------- function funkce () --------------------------------- -- Pedové ----------------------- --------------------------------- setPedCameraRotation ( John, 130.791931 ) setPedControlState ( John, forwards, true ) --------------------------------- -- Outputy ---------------------- --------------------------------- outputChatBox ("EAG|#ffffffDeeJay: #ff9900Hello guys", 255,255,255, true ) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()), funkce ) Ped name = John But why he isn't moving?
DiSaMe Posted July 20, 2013 Posted July 20, 2013 Maybe because you use an undefined variable (forwards) rather than a string ("forwards") in setPedControlState?
papam77 Posted July 20, 2013 Author Posted July 20, 2013 --------------------------------- -- DeeJay v2 -------------------- --------------------------------- function funkce () --------------------------------- -- Pedové ----------------------- --------------------------------- setPedCameraRotation ( John, 130.791931 ) setPedControlState ( John, "forwards", true ) --------------------------------- -- Outputy ---------------------- --------------------------------- outputChatBox ("EAG|#ffffffDeeJay: #ff9900Hello guys", 255,255,255, true ) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()), funkce ) And doesn't work.
DiSaMe Posted July 20, 2013 Posted July 20, 2013 Another reason is because the variable John is not defined. If you want to get the element from ID, use this function: getElementByID
papam77 Posted July 20, 2013 Author Posted July 20, 2013 local John = getElementByID("John") setPedCameraRotation ( "John", 130.791931 ) setPedControlState ( "John", "forwards", true ) now i have this and doesn't work.
CocaColaBear Posted July 20, 2013 Posted July 20, 2013 local John = getElementByID("John") setPedCameraRotation (John, 130.791931 ) setPedControlState (John, "forwards", true ) Use this
denny199 Posted July 20, 2013 Posted July 20, 2013 script your own ped instead, also if you are testing in editor put it then in dimension 200.
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