Jump to content

[HELP]Block animation or action.


off

Recommended Posts

Posted

I just want to prevent the player run (sprint).

i5 7400 3.0GHZ
B150M-GAMING 3 DDR4
HyperX FURY 8GB 2133Mhz DDR4
Galax GTX 1060 6GB OC

Posted
toggleControl("sprint",false) 

cliente side for all

Cliente side for all? What does that mean exactly? Can only be used on the client side?

i5 7400 3.0GHZ
B150M-GAMING 3 DDR4
HyperX FURY 8GB 2133Mhz DDR4
Galax GTX 1060 6GB OC

Posted

toggleControl is client & server-side.

Please do not PM me with scripting related question nor support, use the forums instead.

Posted
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) 

i5 7400 3.0GHZ
B150M-GAMING 3 DDR4
HyperX FURY 8GB 2133Mhz DDR4
Galax GTX 1060 6GB OC

Posted
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

560x95_FFFFFF_09FF00_050505_000000.png

"Querer não é poder, mas tentar é avançar"!

Posted
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?

i5 7400 3.0GHZ
B150M-GAMING 3 DDR4
HyperX FURY 8GB 2133Mhz DDR4
Galax GTX 1060 6GB OC

Posted
sorry, I do not know.

Is there a list of actions that work with this function?

i5 7400 3.0GHZ
B150M-GAMING 3 DDR4
HyperX FURY 8GB 2133Mhz DDR4
Galax GTX 1060 6GB OC

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...