Jump to content

How do i make ped's sprint ?


Tekken

Recommended Posts

Posted

I used this for making them walk :

function setPedZombiWalk() 
    for i,ped in ipairs(getElementsByType("ped")) do 
        local zombi = getElementData(ped,"zombie") 
        if zombi then  
            setPedWalkingStyle(ped, 120) 
        end 
    end     
end 

and this for sprint and didn't work:

function setPedZombiSprint() 
    for i,ped in ipairs(getElementsByType("ped")) do 
        local zombi = getElementData(ped,"zombie") 
        if zombi then  
            setPedControlState(ped, "sprint", true) 
        end 
    end 
end 

Walking style is OLDMAN and walk ok but didn't sprint

Resources I made:

Do not PM me for help with leaked scripts! I WILL NOT HELP YOU!

 

Posted

You need to make the ped walk first.

  
function setPedZombiSprint() 
    for i,ped in ipairs(getElementsByType("ped")) do 
        local zombi = getElementData(ped,"zombie") 
        if zombi then 
            setPedControlState (ped, "forwards", true) 
            setPedControlState(ped, "sprint", true) 
        end 
    end 
end 

Business System viewtopic.php?f=108&t=35797

Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726

SQLite Tutorial viewtopic.php?f=148&t=38203

Posted

My bad, it's forwards not walk, try this:

  
function setPedZombiSprint() 
    for i,ped in ipairs(getElementsByType("ped")) do 
        local zombi = getElementData(ped,"zombie") 
        if zombi then 
            setPedControlState (ped, "forwards", true) 
            setPedControlState(ped, "sprint", true) 
        end 
    end 
end 

Business System viewtopic.php?f=108&t=35797

Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726

SQLite Tutorial viewtopic.php?f=148&t=38203

Posted
My bad, it's forwards not walk, try this:
  
function setPedZombiSprint() 
    for i,ped in ipairs(getElementsByType("ped")) do 
        local zombi = getElementData(ped,"zombie") 
        if zombi then 
            setPedControlState (ped, "forwards", true) 
            setPedControlState(ped, "sprint", true) 
        end 
    end 
end 

Still not working..

They walk but not sprint.

Is there any way to force them sprint ?

Resources I made:

Do not PM me for help with leaked scripts! I WILL NOT HELP YOU!

 

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...