mucuk6547 Posted April 20, 2023 Posted April 20, 2023 Hi, I want the character to tilt right when moving. It bends to the right, but this time it does not move, w a s d locks. Please help me. https://i.imgyukle.com/2023/04/20/QbJ5sf.png local isLeaned = false local ifp = engineLoadIFP("parkour.ifp") function leanRight() if not isLeaned then local task = getPedTask(localPlayer, "secondary", 0) if task == "TASK_SIMPLE_USE_GUN" or task == "TASK_SIMPLE_IN_AIR" then isLeaned = true setPedAnimation(localPlayer, "parkour", "CartWheel", -1, false, false, false, true) setControlState("forwards", false) setControlState("backwards", false) setControlState("left", false) setControlState("right", false) setControlState("fire", false) end end end bindKey("q", "down", leanRight) function leanLeft() if not isLeaned then local task = getPedTask(localPlayer, "secondary", 0) if task == "TASK_SIMPLE_USE_GUN" or task == "TASK_SIMPLE_IN_AIR" then isLeaned = true setPedAnimation(localPlayer, "parkour", "CartWheel", -1, false, false, false, true) setControlState("forwards", false) setControlState("backwards", false) setControlState("left", false) setControlState("right", false) setControlState("fire", false) end end end bindKey("e", "down", leanLeft) function stopLean() if isLeaned then setPedAnimation(localPlayer, false) isLeaned = false setControlState("forwards", getKeyState("w")) setControlState("backwards", getKeyState("s")) setControlState("left", getKeyState("a")) setControlState("right", getKeyState("d")) setControlState("fire", getKeyState("mouse1")) end end bindKey("e", "up", stopLean) bindKey("q", "up", stopLean)
Doongogar Posted April 20, 2023 Posted April 20, 2023 set the fifth argument of the setPedAnimation function to true, this determines whether the animation will loop or not. this may not work as some animations are not meant to run while the ped is moving
mucuk6547 Posted April 21, 2023 Author Posted April 21, 2023 19 hours ago, SciptNovato said: set the fifth argument of the setPedAnimation function to true, this determines whether the animation will loop or not. this may not work as some animations are not meant to run while the ped is moving I can't figure it out can you help me
Doongogar Posted April 21, 2023 Posted April 21, 2023 2 hours ago, mucuk6547 said: I can't figure it out can you help me https://imgur.com/a/IJNFKxM you would just change false to true, it would look like this: setPedAnimation(localPlayer, "parkour", "CartWheel", -1, true, false, false, true)
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