[Release] Player Current Weapon Drop

i think its related to essential mode or you have something else that’s conflicting with this one, lets say you have a weapon database , this script is not gonna remove your weapon from database too and you might rearm every time you use it.

You equip another weapon from your inventory, it’s from GTA, not from other ressources.

I’ve PM “hbk” with a fresh new script, I let him publish it.

Spoiler :
Drop weapon model
Lootable by other
set unarmed after drop

See ya, have fun

That’s what I said above. Lol. Add one native and it works fine. :grinning: Lootable by others, that’s cool though. Although I have player weapon pickup false. (Prison guards and military drop Ar’s)

dont kill the wanted level and add the no dispatch native :wink:

Prison guard and Military will defend it self

True, but I prefer no wanted level. And they will defend themselves but if killed they still drop weapons. I found out after 4hrs of playing around that setting a model type not to drop weapons is not so easy. Until I can figure that out, I just don’t allow players weapon pickups.

how about blacklist militarian models?

I tried that awhile back. It blacklists them from being spawned by player but doesn’t stop them from spawning naturally. Went to the base, tanks and military and chat was being spammed with “this model is blacklisted”. For military vehicles I just lock that vehicle class.

if you tested it and it’s ok you can post it here as modification, if guys are gonna like it i will put it into first link too

I would rather use SET_PED_DROPS_INVENTORY_WEAPON than SET_PED_DROPS_WEAPON because you have a better control on the weapon object :

  • Choose the offset to drop the weapon
  • Force the pickup to match with the weapon hash

More details http://www.dev-c.com/nativedb/func/info/208a1888007fc0e6

Here is my script :

client side & server side
weapon drop animation : ok
weapon out of inventory : ok
weapon model on the ground : ok
weapon lootable by other player : ok

5 Likes

When I drop my weapon , I can pickup it , but other people cannot ? any idea ?

1 Like

other people already have this weapon?

You cant loot a same weapon

when i drop the weapon its only a clip of ammo and no one can pick it up
any ideas on how to fix that?

Hi , no they don’t have it

hi @GDN_Ashgal i have verified this is not letting other players pick up weapon. only player that drops weapon.
any fix?:slight_smile:

@GDN_Ashgal

Thank’s a lot for your script , but same problem like @Thefoxeur54 , I can pickup , but other people cannot.

Your script is awesome , please just fix the pickup.

Thank you

You have an FX Version ?
[ 354750] Error running system event handling function for resource gdn_dropwep: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: server.lua:18: attempt to call a nil value (method ‘Split’)
[ 354750] stack traceback:
[ 354750] server.lua:18: in function ‘stringSplit’
[ 354750] server.lua:7: in upvalue ‘handler’
[ 354750] citizen:/scripting/lua/scheduler.lua:163: in function citizen:/scripting/lua/scheduler.lua:162
[ 354750] stack traceback:
[ 354750] [C]: in function ‘error’
[ 354750] citizen:/scripting/lua/scheduler.lua:41: in field ‘CreateThreadNow’
[ 354750] citizen:/scripting/lua/scheduler.lua:162: in function citizen:/scripting/lua/scheduler.lua:131

1 Like

@GDN_Ashgal
Is there a way to make this work with inventoryhud?
On inventoryhud the weapon still stays