Hier habe ich ein Code der mir verdächtig vorkommt in
der Main LUA hmm ich weis jetzt nicht direkt was ich machen muss
wie zb hier "local NoDrop = {} -- Drop blacklist" Da habe ich auch schon Probiert geht net also wie?
Code:
/*---------------------------------------------------------
Shipments
---------------------------------------------------------*/
local NoDrop = {} -- Drop blacklist
local function DropWeapon(ply)
local ent = ply:GetActiveWeapon()
if not ValidEntity(ent) then return "" end
if GetConVarNumber("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
if table.HasValue(NoDrop, ent:GetClass()) then 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(ply, ent)
if ValidEntity(ply) and ValidEntity(ent) and ent:GetModel() then
local ammohax = false
local ammotype = ent:GetPrimaryAmmoType()
local ammo = ply:GetAmmoCount(ammotype)
local clip = (ent.Primary and ent.Primary.ClipSize) or 0
if ammo and ammo <= clip then
ammohax = true
end
ply:DropWeapon(ent) -- Drop it so the model isn't the viewmodel
local weapon = ents.Create("spawned_weapon")
local model = (ent:GetModel() == "models/weapons/v_physcannon.mdl" and "models/weapons/w_physics.mdl") or ent:GetModel()
weapon.ShareGravgun = true
weapon:SetPos(ply:GetShootPos() + ply:GetAimVector() * 30)
weapon:SetModel(model)
weapon:SetSkin(ent:GetSkin())
weapon.weaponclass = ent:GetClass()
weapon.nodupe = true
weapon.ammohacked = ammohax
weapon:Spawn()
ent:Remove()
end
end, ply, ent)
return ""
end
AddChatCommand("/drop", DropWeapon)
AddChatCommand("/dropweapon", DropWeapon)
AddChatCommand("/weapondrop", DropWeapon)