Request
⚠️ Warning
These options are blocking, it's recommended to call inside of a thread or job.
control
Requests control of an entity.
---@param entity integer
---@param force_ownership? bool
function request.control(entity, force_ownership?): bool model
Requests a model to be loaded.
---@param model string|integer
function request.model(model): bool weapon
Requests a weapon to be loaded.
---@param model string|integer
function request.weapon(model): bool dict
Requests a dictionary to be loaded.
---@param dictionary string
function request.dict(dictionary): bool anim
Requests an animation to be loaded.
---@param animation string
function request.anim(animation): bool particle
Requests a particle to be loaded.
---@param particle string
function request.particle(particle): bool Example
local natives = require('natives')
util.create_job(function()
local hash = joaat('player_two')
if request.model(hash) then
natives.set_player_model(players.me().id, hash)
end
end)