M MY Multiplayer: Wiki
Side
Kind

setPedBodyShape

Shared

Changes a ped's body by a named shape, which enlarges the bones it declares.

bool setPedBodyShape(ped ped, string name, float factor)

Parameters

NameTypeDescription
pedpedThe ped or player.
namestringThe shape's name, as the ped's skeleton declares it in <BodyShapes>. Up to 16 characters.
factorfloatFrom 0 (no shape) to 1 (the shape at its fullest).

Returns

true if the shape was applied, false if the ped already has 4 shapes other than 0.

A factor of 0 removes the shape from the ped. On the server, the change is sent to every client. On the client, it applies to this client only.

Example

addEventHandler("onPlayerSpawn", root, function()
    setPedBodyShape(source, "muscle", 0.6)
end)

See also