PedClient

clonePedToTarget

CLONE_PED_TO_TARGET0xE952D6431689AD9A

The GTA V native CLONE_PED_TO_TARGET of the PED namespace, as LS:MP client scripts call it: the global function clonePedToTarget, in JavaScript and in Lua.

SignatureJavaScript
clonePedToTarget(ped: Ped, targetPed: Ped): void
SignatureLua
clonePedToTarget(ped: Ped, targetPed: Ped)

Usage

JavaScript
clonePedToTarget(ped, targetPed);
Lua
clonePedToTarget(ped, targetPed)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
targetPedPednumberinteger

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Copies ped's components and props to targetPed.

Reference

Namespace
Ped PED
In the game
void CLONE_PED_TO_TARGET(Ped ped, Ped targetPed)
Hash
0xE952D6431689AD9A
Formerly
_ASSIGN_PLAYER_TO_PED

Open in the interactive natives reference