Hello,
I have now tried to blacklist a thing from dropping in main.lua
But it dosen't work.
[CODE]local NoDrop = {"weapon_fists"} -- Drop blacklist
local function DropWeapon(ply)
local ent = ply:GetActiveWeapon()
if not IsValid(ent) then
GAMEMODE:Notify(ply, 1, 4, DarkRP.getPhrase("cannot_drop_weapon"))
return ""
end
local canDrop = hook.Call("CanDropWeapon", GAMEMODE, ply, ent)
if not canDrop then
GAMEMODE:Notify(ply, 1, 4, DarkRP.getPhrase("cannot_drop_weapon"))
return ""
end
local RP = RecipientFilter()
RP:AddAllPlayers()
umsg.Start("anim_dropitem", RP)
umsg.Entity(ply)
umsg.End()
ply.anim_DroppingItem = true
timer.Simple(1, function()
if IsValid(ply) and IsValid(ent) and ent:GetModel() then
ply:DropDRPWeapon(ent)
end
end)
return ""
end
AddChatCommand("/drop", DropWeapon)
AddChatCommand("/dropweapon", DropWeapon)
AddChatCommand("/weapondrop", DropWeapon)[/CODE]
Sorry, you need to Log In to post a reply to this thread.