I quote an example
function PutInBodybag()
local playerPed = PlayerPedId()
local playerCoords = GetEntityCoords(playerPed)
deadCheck = IsEntityDead(playerPed)
if deadCheck and not attached then
SetEntityVisible(playerPed, false, false)
RequestModel(Config.bag_model)
while not HasModelLoaded(Config.bag_model) do
Citizen.Wait(1)
end
bodyBag = CreateObject(Config.bag_hash, playerCoords.x, playerCoords.y, playerCoords.z, true, true, true)
AttachEntityToEntity(bodyBag, playerPed, 0, -0.2, 0.75, -0.2, 0.0, 0.0, 0.0, false, false, false, false, 20, false)
attached = true
end
end
this is the code. Is someone know why are thiese not working? Essentialmode sided server could affect it? I should transform the server to es_extended?