off Posted January 2, 2014 Share Posted January 2, 2014 I just want to prevent the player run (sprint). Link to comment
manawydan Posted January 2, 2014 Share Posted January 2, 2014 toggleControl("sprint",false) cliente side for all Link to comment
off Posted January 2, 2014 Author Share Posted January 2, 2014 toggleControl("sprint",false) cliente side for all Cliente side for all? What does that mean exactly? Can only be used on the client side? Link to comment
DNL291 Posted January 2, 2014 Share Posted January 2, 2014 toggleControl is client & server-side. Link to comment
manawydan Posted January 2, 2014 Share Posted January 2, 2014 addEventHandler("onPlayerJoin",root, function() toggleControl(source,"sprint",false) end) try Link to comment
off Posted January 2, 2014 Author Share Posted January 2, 2014 addEventHandler("onPlayerJoin",root, function() toggleControl(source,"sprint",false) end) try Thanks, but how do I add it? addEvent("tiredAnimation",true) addEventHandler("tiredAnimation",root,function(target) setPedAnimation ( target, "FAT", "IDLE_tired", -1, true, false ) setElementData(target, "tired", true) setTimer(triggerEvent, 10000, 1, "switchToNormal", root, target ) end) Link to comment
manawydan Posted January 2, 2014 Share Posted January 2, 2014 addEvent("tiredAnimation",true) addEventHandler("tiredAnimation",root,function(target) setPedAnimation ( target, "FAT", "IDLE_tired", -1, true, false ) setElementData(target, "tired", true) toggleControl(target,'sprint',false) setTimer(triggerEvent, 10000, 1, "switchToNormal", root, target ) end) event 'switToNormal" use toggleControl? if not, use toggleControl(target,'sprint',true) try Link to comment
off Posted January 2, 2014 Author Share Posted January 2, 2014 addEvent("tiredAnimation",true) addEventHandler("tiredAnimation",root,function(target) setPedAnimation ( target, "FAT", "IDLE_tired", -1, true, false ) setElementData(target, "tired", true) toggleControl(target,'sprint',false) setTimer(triggerEvent, 10000, 1, "switchToNormal", root, target ) end) event 'switToNormal" use toggleControl? if not, use toggleControl(target,'sprint',true) try Thanks, the first attempt worked. Is it possible to block a specific animation? Link to comment
off Posted January 2, 2014 Author Share Posted January 2, 2014 sorry, I do not know. Is there a list of actions that work with this function? Link to comment
Drakath Posted January 3, 2014 Share Posted January 3, 2014 Use cancelEvent when someone starts the animation you want to block. Link to comment
Quited Posted January 3, 2014 Share Posted January 3, 2014 in past , i write a topic in Suggestions Section about cancelAnimations Function But no one cares about "Suggestions Section" my topic : viewtopic.php?f=102&t=61746&hilit=cancelAnimations Link to comment
Drakath Posted January 3, 2014 Share Posted January 3, 2014 Well, it is not necessary because you can accomplish that by scripting with existing functions. 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