Log in to reply
 

Need Help.



  • Function.Call(Hash.SET_PLAYER_SPRINT, Game.Player.Character, true); doesn't work. I have some code that sets it to false under one condition, then, when that condition isn't true anymore and another condition is met, it's supposed to be turned to true. I can't even sprint after reloading the script! I put that function in the initialization to set it to true as well and it won't work whatever I do...

    Also, how do you make a ped wander off while doing the amb@code_human_wander_eating_donut@male@idle_a animation and actually having a hotdog in his hand? I tried it by making the ped wander off then spawning the hotdog prop then attaching it to his hand bone and then making the ped play the animation. Result: Ped turned into a hotdog, literally. The ped dissapeared and instead I was left with a floating hotdog where the ped's torso was... I tried the code from jedijosh, same there...


  • MODERATOR

    @Eyon said in Need Help.:

    Function.Call(Hash.SET_PLAYER_SPRINT, Game.Player.Character, true); doesn't work. I have some code that sets it to false under one condition, then, when that condition isn't true anymore and another condition is met, it's supposed to be turned to true. I can't even sprint after reloading the script! I put that function in the initialization to set it to true as well and it won't work whatever I do...

    You can try sending the sprint control manually every x amount of milliseconds. Game.SetControlNormal(2, GTA.Control.Sprint, 1f);

    @Eyon said in Need Help.:

    Also, how do you make a ped wander off while doing the amb@code_human_wander_eating_donut@male@idle_a animation and actually having a hotdog in his hand? I tried it by making the ped wander off then spawning the hotdog prop then attaching it to his hand bone and then making the ped play the animation. Result: Ped turned into a hotdog, literally. The ped dissapeared and instead I was left with a floating hotdog where the ped's torso was... I tried the code from jedijosh, same there...

    Not sure but I would try setting the Wander task on the ped, attach the hotdog prop, then play the animation on just the upper body of the ped (there's an animation flag). Are you using the Entity.AttachTo method to attach the prop to the ped? Try attaching to SKEL_L_Hand or SKEL_R_Hand.



  • Thanks, the only problem is when you send the sprint control the player stops, I want it to still be able to run slowly though...



  • @stillhere Do you know of any way to make it like in the Simple Zombies mod, where when you sprint too much you can still run but not sprint. That's basically what I want. The SetControl just makes the player unable to run at all...



  • @stillhere Actually never mind, I just realized that mod is the same. What about playing an animation on UppeBodyOnly flag and walking at the same time, is that possible?



  • @stillhere I looked it up in Menyoo, it's possible there. The flag is Upperbody Only Secondary Task but neither are there natives nor flags to make it happen.


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.