Skip to main content

PedCreatePoint

Description

Create a character at a pre-defined point, as opposed to a custom position like PedCreateXYZ. The ped will be tied to the current script so that it is cleaned up when the script terminates, and will of course be returned for you to script with. Remember you can only use information from .DAT files that are loaded.

function PedCreatePoint(id, plist, pnumber) --[[ ... ]] end

Parameters

  • id: integer - Ped model ID
  • plist: number - Point list
  • pnumber: number - Point number

Return Values

  • ped: integer - The ID of the created ped (Not the model ID).

Example

Create Tad and Parker in the boxing gym.

DATLoad("2_03.DAT", 2) -- Load the .DAT with the point we need

local tad = PedCreatePoint(31, POINTLIST._2_03_PlayerStart, 1)
local parker = PedCreatePoint(40, POINTLIST._2_03_PlayerStart, 2)

See Also