Xseba360 / fivem-lua-docs

Lua file reference for use with Luanalysis, a plugin for JetBrains IDEs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fivem-lua-docs

Build Status GitHub last commit GitHub release (latest by date) GitHub

Originally created by SnakeSVx.

Lua file reference for use with Luanalysis, a plugin for JetBrains IDEs. It will definitely not work with EmmyLua due to @shape and @overloadbeing used.

The code could definitely use some refactoring, as this was not meant to be anything more than a simple hack.

Tweaks

The generated methods are tweaked to be more accurate manually. See some of them below (the docs are truncated).

GetGamePool

Different type is returned based on the pool parameter.

--- @param poolName string (char*)
--- @return (Ped|Object|Vehicle|Pickup)[]
--- @overload fun(poolname: 'CPed'): Ped[]
--- @overload fun(poolname: 'CObject'): Object[]
--- @overload fun(poolname: 'CVehicle'): Vehicle[]
--- @overload fun(poolname: 'CPickup'): Pickup[]
function GetGamePool(poolName) end

GetEntityCoords

The alive parameter is marked as optional, so it doesn't show up as error when used on server (where the alive parameter does not exist).

--- @param entity Entity
--- @param alive boolean
--- @return Vector3
--- @overload fun(entity: Entity): Vector3
function GetEntityCoords(entity, alive) end

AddRelationshipGroup

This native has two pointer parameters, therefore it doesn't qualify as a single-pointer native and is fixed manually.

--- @param name string (char*)
--- @param groupHash Hash (Hash*)
--- @return any
--- @overload fun(name: string): Hash
function AddRelationshipGroup(name, groupHash) end

About

Lua file reference for use with Luanalysis, a plugin for JetBrains IDEs.

License:GNU General Public License v3.0


Languages

Language:Lua 99.5%Language:TypeScript 0.5%Language:JavaScript 0.0%Language:Shell 0.0%