PedClient

clonePedAlt

CLONE_PED_ALT0x668FD40BCBA5DE48

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

SignatureJavaScript
clonePedAlt(
  ped: Ped,
  isNetwork: boolean,
  bScriptHostPed: boolean,
  copyHeadBlendFlag: boolean,
  p4: boolean
): Ped
SignatureLua
clonePedAlt(
  ped: Ped,
  isNetwork: boolean,
  bScriptHostPed: boolean,
  copyHeadBlendFlag: boolean,
  p4: boolean
): Ped

Usage

JavaScript
const result = clonePedAlt(ped, isNetwork, bScriptHostPed, copyHeadBlendFlag, p4);
Lua
local result = clonePedAlt(ped, isNetwork, bScriptHostPed, copyHeadBlendFlag, p4)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
isNetworkBOOLbooleanboolean
bScriptHostPedBOOLbooleanboolean
copyHeadBlendFlagBOOLbooleanboolean
p4BOOLbooleanboolean

Returns

Ped JavaScript number, Lua integer

Game handle of a ped. Not an LS:MP netId. Convert one with lsmp.getEntityFromNetId.

Reference

Namespace
Ped PED
In the game
Ped CLONE_PED_ALT(Ped ped, BOOL isNetwork, BOOL bScriptHostPed, BOOL copyHeadBlendFlag, BOOL p4)
Hash
0x668FD40BCBA5DE48
Introduced
Game build 463 legacy numbering
Formerly
_CLONE_PED_2 _CLONE_PED_EX

Open in the interactive natives reference