[Release] [ESX] Loot The Dead Corpse

this is my very first script

it allows specific jobs to loot dead corpse, of course with a cute animation by pressing ‘E’.

feel free to check and update my mistakes :slight_smile:

Demo

Installing

after download/clone rename the folder from

irforce_lootdeadcorpsee-master

to

irforce_lootdeadcorpse

then goto to the address below and change the jobs name of your liking

irforce_lootdeadcorpse/client/main.lua:29

just replace the “jobname-here” with the job name you like for example:

if IsControlJustReleased(0, 38) and ( ESX.PlayerData["job"]["name"] == "fbi" or ESX.PlayerData["job"]["name"] == "police" ) then

or if you like to allow all players to loot, just remove the code below

and ( ESX.PlayerData["job"]["name"] == "jobname-here" or ESX.PlayerData["job"]["name"] == "jobname-here" )

and it will looks like this:

if IsControlJustReleased(0, 38) then

also you can change config file to your liking
and for the final step put the line below in your server.cfg file

start irforce_lootdeadcorpse

Download

Credits

Please read Credits.md for more information.

8 Likes

Does this have the same issue that esx_policejob has where if you loot a body of its weapons while it is dead, then they are revived using the revive function from ambulancejob, the person gets their weapons back?

If so, what is the benefit of this script over simply using the function from the policejob script?

1 Like

it’s fix in our server, so try it and check yourself please
Also players can’t dup items with this one

video added to first post

1 Like

Good Job :open_mouth:

2 Likes

I think we can remove the ‘job obligation’ with removing the code

and ( ESX.PlayerData["job"]["name"] == "fbi" or ESX.PlayerData["job"]["name"] == "police" ) then
1 Like

Hello,

I did install your script correctly and its good i can actually rob the dead body but after the revive. the player that was dead lost his weapon in his inventory but, The player can still pull out that gun from the weaponradial menu (TAB button). After a relog the weapon is away but do you have any ideas to fix it?

yes you can

thanks.Will you do the inventoryhud version of this script?

this is a problem with esx or ambulance job , search the forum for the fix it’s already there

i did that but it was a heaven for glitchers :slight_smile: so i decided to use this instead

Credits

added to first post

good job

1 Like

hey can you help me with this ?

SCRIPT ERROR: @irforce_lootdeadcorpse/server/main.lua:107: attempt to concatenate a nil value (global ‘label’)

Thank you! Amazing resource :slight_smile:

1 Like

Hey
f you like to allow all players to loot, just remove the code below

and ( ESX.PlayerData["job"]["name"] == "jobname-here" or ESX.PlayerData["job"]["name"] == "jobname-here" )

else
try new update that just come out

i am getting this!

this is the code

you should change jobname-here
with the job you want

works great thank you!

1 Like

http://prntscr.com/po42qk i comment the lines to allow all people loot but when i try to loot i cant, dont do anything with the e