setPedWalkingStyle | Multi Theft Auto: Wiki Skip to content

setPedWalkingStyle

Client-side
Server-side
Shared

Pair: getPedWalkingStyle

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


Sets the walking style of a ped. A walking style consists of a set of animations that are used for walking, running etc.

OOP Syntax Help! I don't understand this!

  • Method:ped:setWalkingStyle(...)
  • Variable: .walkingStyle

Syntax

bool setPedWalkingStyle ( ped thePed, int style )
Required Arguments
  • thePed: the ped whose walking style to change.
  • style: the walking style to set.

Returns

  • bool: value

Returns true if successful, false otherwise.

Code Examples

shared

Changes the walking style of the player to Drunkman when the resource is started

function onClientResourceStart()
setPedWalkingStyle(localPlayer,126)
end
addEventHandler("onClientResourceStart",resourceRoot, onClientResourceStart)

See Also