Wiki

Clone wiki

EFLC-MP LUA / createObject

Description

Creates a new object. We recommend using the simple native trainer to preview objects and save their locations.

Parameters

Float posX, Float posY, Float posX, Float quatX, Float quatY, Float quatZ, Float quatW, Int modelHash, Int virtualWorld, Bool positionHasOffset, Int roomKey, Int alpha
Float posX: world pos x

Float posY: world pos y

Float posX: world pos z

Float quatX: rotation quaternion X

Float quatY: rotation quaternion Y

Float quatZ: rotation quaternion Z

Float quatW: rotation quaternion W

Int modelHash: hash of the object name, use the openIV hash tool to convert

Int virtualWorld: virtual world for which this object will be streamed

Bool positionHasOffset: most trainers spawn objects without offset

Int roomKey: use 0 unless the object is spawned inside an interior

Int alpha: 0-255

Return values

Int objectId

Example

(https://bitbucket.org/Suge/eflc-mp-lua/src/master/filterscripts/yachtDemo.lua)

Updated