• Few darkrp questions :P
    2 replies, posted
I'm trying to add a blacklist of items you cannot drop in darkrp, I'm not a lua coder but I'm trying, I believe this is the code (Or the only thing I could find) on the dropping in the gamemode. [code]function DropWeapon(ply) local ent = ply:GetActiveWeapon() if not ValidEntity(ent) then return "" end if CfgVars["RestrictDrop"] == 1 then local found = false for k,v in pairs(CustomShipments) do if v.entity == ent:GetClass() then found = true break end end if not found then Notify(ply, 1, 4, LANGUAGE.cannot_drop_weapon) return "" end end ply:DropWeapon(ent) return "" end AddChatCommand("/drop", DropWeapon) AddChatCommand("/dropweapon", DropWeapon) AddChatCommand("/weapondrop", DropWeapon) [/code]
Im sure they would be happy to answer them in darkrp thread
well that's fantastic seeing how this is not a problem with the game mode and an addition to the actual code I think my post would be fine here in the lua section.
Sorry, you need to Log In to post a reply to this thread.