[FREE][ESX/QB] emfan - hostage

Thank you, yes it is! :slight_smile:

1 Like

GG my friend, greatttt onee!!!

1 Like

Thank you brother! I hope you’ll like it :slight_smile:

1 Like

Nice work perfect for RP

Thank you

1 Like

small spell mistake in server lua line 11 ‘RegisterUsableItem’

RegisterUseableItem is wrong(not required “e”)

1 Like

oops, that’s My bad. Will fix this when I come! Thank you for feedback :relaxed::+1:

1 Like

Nice Script

Thank you brother! :slight_smile:

I am sorry to say, but this script can not be used. Many spell mistakes, there is also one at client side at notifications. But the main problem is if ex. more player like 3-4 players around me and I use the item then everyone around me get the bag at their head.

Oh, if that’s the case then I’ll have a look at it. Spelling mistake you can just change in the lang, Im not native eng speaking.

Disable control action not working properly,. F1 phone getting open,F2 inventory getting open, if using chezza inventory, open inventory then player can see everything like normally… please fix soon

Are you using esx or qb? Will have a look at it later today.

1 Like

First of all, thanks for the release! It has good potential. I have one major issue with it though, when there are multiple people near by, it puts a bag over all of their heads and makes it impossible to unbag everyone. Also got stuck when I was carrying someone, I couldn’t let them go and they were just stuck there not able to do a thing.

Another thing I’d like to see would be like a timer where you can break free. Like after 5 minutes you can break off the zip ties and remove the bag off your head and walk again… These scripts get exploited too often by idiots that just walk up to someone and take them hostage and then never let them go… Very frustrating. All in all good script though, cheers.

Esx only, and also have one more issue like if two or more players standing near by and if u use the item both 2players get hostage.

For me this code solved this problem:

function Raycast(flag)
local xPlayer = PlayerPedId()
local playerCoords = GetEntityCoords(xPlayer)
local plyOffset = GetOffsetFromEntityInWorldCoords(xPlayer, 0.0, 2.2, -0.05)
local rayHandle = StartShapeTestCapsule(playerCoords.x, playerCoords.y, playerCoords.z, plyOffset.x, plyOffset.y, plyOffset.z, 2.2, flag or 30, xPlayer)
while true do
Wait(0)
local result, _, _, _, entityHit = GetShapeTestResult(rayHandle)
if result ~= 1 then
local entityType
if entityHit then entityType = GetEntityType(entityHit) end
if entityHit and entityType ~= 0 then
return entityHit, entityType
end
return false
end
end
end

RegisterNetEvent(‘emfan-hostage:client:UseItem’)
AddEventHandler(‘emfan-hostage:client:UseItem’, function()
IsBagged = false
local xPlayer = PlayerPedId()
local xPlayerCoords = GetEntityCoords(xPlayer)

local target = Raycast(12)

if target and IsPedAPlayer(target) and #(GetEntityCoords(xPlayer, true) - GetEntityCoords(target, true)) < 3.0 then
1 Like

thank you where i have to put it ?

whenever i put in my framework whether i put it in as esx or ESX i always get registered nil value ‘ESX’ in my server console. im using esx legacy 1.6.5

1 Like

yea i have everything configured properly for Config Framework i have ESX and its telling me


its saying there is an issue in the sv_main.lua in ur script

ok so basically you have to make sure that you load this script after esx in the server.cfg tht was the solution to my issue.