Author Topic: Disabling /drop to a certain job  (Read 1731 times)

0 Members and 2 Guests are viewing this topic.

Offline Rain

  • Newbie
  • *
  • Posts: 16
  • Karma: 0
Disabling /drop to a certain job
« on: July 06, 2017, 08:29:08 AM »
DarkRP Help,

I've ran into an issue, I'm currently in dev of my server and came across an issue, I have armory for government teams and the weapons are quite alot cheaper and the issue i have come across is that i cannot find a way to disable the /drop for specific teams! i have tried searching around for the last 2 days and have had no luck. I'm wondering if any of you god(s)(esses) can assist me in the pickle ive got myself in.

My knowledge of lua is not that great and what im good at is editing lua not creating it! so please bare in mind thank you in advanced to any helpers!


So i have managed to try some things but no luck!

i have tried these 2 hooks but nothing is working, placing them in lua/autorun/server

// 1
hook.Add( "canDropWeapon", "DisableCPDrops", function( _p, wep )
if _p:isCP() then return false
end )
// 2
hook.Add( "canDropWeapon", "DisableCPDrop", function( _p, wep ) return false !_p:isCP()
end )

any help would be amazing thanks!
« Last Edit: July 06, 2017, 08:38:51 AM by Rain »

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given