Module sv_objects

Object System

Functions

CreateObject (id, modelHash, x, y, z, h, netMissionEntity, doorFlag, freeze) CreateObject function.
CreateClientObject (src, id, modelHash, x, y, z, h, netMissionEntity, doorFlag, freeze, interaction, zone, offsets, text) CreateClientObject function.
FreezeObject (id, boolean) FreezeObject function.
FreezeClientObject (src, id, boolean) FreezeClientObject function.
GetObjects () GetObjects function.
DeleteObject (id) DeleteObject function.
DeleteClientObject (src, id) DeleteClientObject function.
DoesObjectExist (id) DoesObjectExist function.
UpdateObjectCoords (id, x, y, z, h) UpdateObjectCoords function.
IsModels (model, table) IsModels function.
DeleteAllObjects () DeleteAllObjects function.
GetClientObjects () GetClientObjects function.
GetClientObject (src, id) GetClientObject function.


Functions

CreateObject (id, modelHash, x, y, z, h, netMissionEntity, doorFlag, freeze)
CreateObject function. This function creates an object.

Parameters:

  • id The id of the object.
  • modelHash The object model hash.
  • x The object's x coordinate.
  • y The object's y coordinate.
  • z The object's z coordinate.
  • h The object's heading.
  • netMissionEntity The object's net mission entity.
  • doorFlag The object's door flag.
  • freeze The object's freeze state.

Returns:

    number

Usage:

    local objectId = exports.jones_util:CreateObject(1, "prop_test", 0, 0, 0, 0, false, false)
CreateClientObject (src, id, modelHash, x, y, z, h, netMissionEntity, doorFlag, freeze, interaction, zone, offsets, text)
CreateClientObject function. This function creates a client sided object.

Parameters:

  • src The player's server id.
  • id The id of the object.
  • modelHash The object model hash.
  • x The object's x coordinate.
  • y The object's y coordinate.
  • z The object's z coordinate.
  • h The object's heading.
  • netMissionEntity The object's net mission entity.
  • doorFlag The object's door flag.
  • freeze The object's freeze state.
  • interaction The object's interaction table.
  • zone The object's zone.
  • offsets The object's offsets.
  • text The object's text.

See also:

Usage:

    exports.jones_util:CreateClientObject(src, 1, "prop_test", 0, 0, 0, 0, false, false, {}, "zone", {})
FreezeObject (id, boolean)
FreezeObject function. This function freezes an object.

Parameters:

  • id The object id.
  • boolean The object's freeze state.

Usage:

    exports.jones_util:FreezeObject(1, true)
FreezeClientObject (src, id, boolean)
FreezeClientObject function. This function freezes a client sided object.

Parameters:

  • src The player's server id.
  • id The object id.
  • boolean The object's freeze state.

Usage:

    exports.jones_util:FreezeClientObject(src, 1, true)
GetObjects ()
GetObjects function. This function returns the 'objects' table which contains all the objects.

Returns:

    table

Usage:

    local objects = exports.jones_util:GetObjects()
DeleteObject (id)
DeleteObject function. This function deletes an object.

Parameters:

  • id The object id.

Usage:

    exports.jones_util:DeleteObject(1)
DeleteClientObject (src, id)
DeleteClientObject function. This function deletes a client sided object.

Parameters:

  • src The player's server id.
  • id The object id.

Usage:

    exports.jones_util:DeleteClientObject(src, 1)
DoesObjectExist (id)
DoesObjectExist function. This function checks if an object exists.

Parameters:

  • id The object id.

Returns:

    boolean

Usage:

    local exists = exports.jones_util:DoesObjectExist(1)
UpdateObjectCoords (id, x, y, z, h)
UpdateObjectCoords function. This function updates an object's coordinates.

Parameters:

  • id The object id.
  • x The object's x coordinate.
  • y The object's y coordinate.
  • z The object's z coordinate.
  • h The object's heading.

Usage:

    exports.jones_util:UpdateObjectCoords(1, 0, 0, 0, 0)
IsModels (model, table)
IsModels function. This function checks if a model is equal to another model.

Parameters:

  • model The model. string
  • table models The model(s). table

Returns:

    boolean

Usage:

    local isModel = exports.jones_util:IsModels("adder", {"adder", "adder2"})
DeleteAllObjects ()
DeleteAllObjects function. This function deletes all objects.

Usage:

    exports.jones_util:DeleteAllObjects()
GetClientObjects ()
GetClientObjects function. This function returns the 'clientObjects' table which contains all the client objects.

Returns:

    table

Usage:

    local clientObjects = exports.jones_util:GetClientObjects()
GetClientObject (src, id)
GetClientObject function. This function returns a client object.

Parameters:

  • src The player's server id.
  • id The object id.

Returns:

    object

Usage:

    local clientObject = exports.jones_util:GetClientObject(src, 1)
generated by LDoc 1.5.0 Last updated 2024-05-13 19:05:24