DarkRP holdtype bug?

I have a problem on my darkrp server. the Keys, the pocket and the weaponchecker are being held as “normal”, but it looks like the playermodel is holding a 357 with his right arm for some reason. Does somebody know why this is happening?

Use the latest svn

Well i am using the latest SVN version of DarkRP

The holdtype is normal, but it looks like a he’s holding a 357 (only with his right hand)

And the holdtype fix doesn’t help a bit since that isn’t the problem

that 1 is not working and its spamming errors and crashing servers.

http://s965.photobucket.com/albums/ae139/Keyzzerr/?action=view&current=357.jpg here’s a picture

It’s because DarkRp is poorly coded

I didn’t make this thread so that you could bash DarkRP. I did it so that i could get help with a problem that’s occurring on my server. So either help me or stop posting!

Pocket and Keys don’t have models, but they need them to work as ents. I guess the coder just wrote them to appear as .357s

No its not. Its poorly used.

It does work pretty perfectly, but not on every SWEP

If you could tell the errors i could fix my hacky fix

I fixed it now! it was a lua file named dropweapon that caused the trouble. By the way your holdtype fix doesn’t do a thing for me (atleast none of the madcow sweps).

Yeah it only works for some people apparantly

Well i got it working now. the Problem was that i thought that it was supposed to be in the autorun folder, and i think that many others thought the same thing.

Yes it is. Are you retarded. The scripter and maintainer is a moron that hardly knows lua. If a magnum is showing up for hands that means that he doesn’t even know how to make proper RP hands.

Fuck, here you go.

replace this with DarkRP/entities/weapons/keys/shared.lua
[lua]if SERVER then
AddCSLuaFile(“shared.lua”)
end

if CLIENT then
SWEP.PrintName = “Keys”
SWEP.Slot = 1
SWEP.SlotPos = 3
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = false
end

SWEP.Author = “Rick Darkaliono, philxyz”
SWEP.Instructions = “Left click to lock. Right click to unlock”
SWEP.Contact = “”
SWEP.Purpose = “”
SWEP.ViewModel == “”
SWEP.WorldModel == “”

SWEP.ViewModelFOV = 62
SWEP.ViewModelFlip = false
SWEP.AnimPrefix = “rpg”

SWEP.Spawnable = false
SWEP.AdminSpawnable = true
SWEP.Sound = “doors/door_latch3.wav”
SWEP.Primary.ClipSize = -1
SWEP.Primary.DefaultClip = 0
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = “”

SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = 0
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = “”

function SWEP:Initialize()
self:SetWeaponHoldType(“normal”)
end

function SWEP:Deploy()
if SERVER then
self.Owner:DrawViewModel(false)
self.Owner:DrawWorldModel(false)
end
end

function SWEP:PrimaryAttack()
local trace = self.Owner:GetEyeTrace()

if not ValidEntity(trace.Entity) or not trace.Entity:IsOwnable() or (trace.Entity.DoorData and trace.Entity.DoorData.NonOwnable) then
	return
end

trace.Entity.DoorData = trace.Entity.DoorData or {}

if trace.Entity:IsDoor() and self.Owner:EyePos():Distance(trace.Entity:GetPos()) > 65 then
	return
end

if trace.Entity:IsVehicle() and self.Owner:EyePos():Distance(trace.Entity:GetPos()) > 100 then
	return
end

local Team = self.Owner:Team()

if trace.Entity:OwnedBy(self.Owner) or (trace.Entity.DoorData.GroupOwn and table.HasValue(RPExtraTeamDoors[trace.Entity.DoorData.GroupOwn], Team))  then
	if SERVER then
		self.Owner:EmitSound("npc/metropolice/gear".. math.floor(math.Rand(1,7)) ..".wav")
		trace.Entity:Fire("lock", "", 0) -- Lock the door immediately so it won't annoy people
		timer.Simple(0.9, function(ply, sound) if ValidEntity(ply) then ply:EmitSound(sound) end end, self.Owner, self.Sound)
		
		local RP = RecipientFilter()
		RP:AddAllPlayers()
		
		umsg.Start("anim_keys", RP) 
			umsg.Entity(self.Owner)
			umsg.String("usekeys")
		umsg.End()
		self.Owner:AnimRestartGesture(GESTURE_SLOT_ATTACK_AND_RELOAD, ACT_ITEM_PLACE)
	end
	self.Weapon:SetNextPrimaryFire(CurTime() + 0.3)
else
	if trace.Entity:IsVehicle() and SERVER then
		Notify(self.Owner, 1, 3, "You don't own this vehicle!")
	elseif not trace.Entity:IsVehicle() then
		if SERVER then self.Owner:EmitSound("physics/wood/wood_crate_impact_hard2.wav", 100, math.random(90, 110))
			umsg.Start("anim_keys", RP) 
				umsg.Entity(self.Owner)
				umsg.String("knocking")
			umsg.End()
			
			self.Owner:AnimRestartGesture(GESTURE_SLOT_ATTACK_AND_RELOAD, ACT_HL2MP_GESTURE_RANGE_ATTACK_FIST)
		end
	end
	self.Weapon:SetNextPrimaryFire(CurTime() + 0.2)
end

end

function SWEP:SecondaryAttack()
local trace = self.Owner:GetEyeTrace()

if not ValidEntity(trace.Entity) or not trace.Entity:IsOwnable() or trace.Entity.DoorData.NonOwnable then
	return
end

if trace.Entity:IsDoor() and self.Owner:EyePos():Distance(trace.Entity:GetPos()) > 65 then
	return
end

if trace.Entity:IsVehicle() and self.Owner:EyePos():Distance(trace.Entity:GetPos()) > 100 then
	return
end

local Team = self.Owner:Team()
if trace.Entity:OwnedBy(self.Owner) or (trace.Entity.DoorData.GroupOwn and table.HasValue(RPExtraTeamDoors[trace.Entity.DoorData.GroupOwn], Team)) then
	if SERVER then
		self.Owner:EmitSound("npc/metropolice/gear".. math.floor(math.Rand(1,7)) ..".wav")
		trace.Entity:Fire("unlock", "", 0)-- Unlock the door immediately so it won't annoy people
		timer.Simple(0.9, function(ply, sound) if ValidEntity(ply) then ply:EmitSound(sound) end end, self.Owner, self.Sound)
		
		umsg.Start("anim_keys", RP) 
			umsg.Entity(self.Owner)
			umsg.String("usekeys")
		umsg.End()
		self.Owner:AnimRestartGesture(GESTURE_SLOT_ATTACK_AND_RELOAD, ACT_ITEM_PLACE)
	end
	self.Weapon:SetNextSecondaryFire(CurTime() + 0.3)
else
	if trace.Entity:IsVehicle() and SERVER then
		Notify(self.Owner, 1, 3, "You don't own this vehicle!")
	elseif not trace.Entity:IsVehicle() then
		if SERVER then self.Owner:EmitSound("physics/wood/wood_crate_impact_hard3.wav", 100, math.random(90, 110))
			umsg.Start("anim_keys", RP) 
				umsg.Entity(self.Owner)
				umsg.String("knocking")
			umsg.End()
			
			self.Owner:AnimRestartGesture(GESTURE_SLOT_ATTACK_AND_RELOAD, ACT_HL2MP_GESTURE_RANGE_ATTACK_FIST)
		end
	end
	self.Weapon:SetNextSecondaryFire(CurTime() + 0.2)
end

end

SWEP.OnceReload = false
function SWEP:Reload()
local trace = self.Owner:GetEyeTrace()
if not ValidEntity(trace.Entity) or (ValidEntity(trace.Entity) and ((not trace.Entity:IsDoor() and not trace.Entity:IsVehicle()) or self.Owner:EyePos():Distance(trace.HitPos) > 200)) then
if not self.OnceReload then
if SERVER then Notify(self.Owner, 1, 3, “You need to be looking at a door/vehicle in order to bring up the menu”) end
self.OnceReload = true
timer.Simple(3, function() self.OnceReload = false end)
end
return
end
if SERVER then
umsg.Start(“KeysMenu”, self.Owner)
umsg.Bool(self.Owner:GetEyeTrace().Entity:IsVehicle())
umsg.End()
end
end
[/lua]

ITT: Axiom found a function FPtje didn’t know about, and therefore claims imaginary throne.

I’ve already fixed it. If you look up you can see it (It was file named dropallweapons.lua that i had downloaded a long time ago:ms: ), but thanks anyway for trying to help me.