Garry's Mod

Garry's Mod

508 평점
TTT M60
   
어워드
즐겨찾기
즐겨찾기됨
즐겨찾기 해제
Content Type: Addon
Addon Type: Weapon
Addon Tags: Fun, Realism
파일 크기
게시일
업데이트일
6.834 MB
2015년 4월 5일 오후 11시 33분
2015년 7월 10일 오후 3시 24분
업데이트 노트 5개 (보기)

다운로드 위해 구독하기
TTT M60

설명
A weapon for the Garry's Mod addon Trouble in Terrorist Town (TTT)

This weapon was designed for Innocent's use.

Weapon Stats:
200 round box
14.5 damage per body shot
0.1275 delay between firing

Note: I did not make the weapon model and do not take credit for it. I will remove this if the creator wants me to.
댓글 15
Dorito 2016년 10월 22일 오후 9시 05분 
Can I Use This Outside Of TTT?
*Sam 2015년 7월 11일 오후 4시 56분 
Here you are, this is exactly as I'm using it on my server and I don't get any lua script errors.
http://pastebin.com/YiYaUWm1
There are a couple other changes in there too, just a heads up.
FrostyIce  [작성자] 2015년 7월 11일 오전 3시 05분 
I'll have to look more in depth into your code when I have time. So far, when I put your changes in, the game has a draw error. If you want to just put the entire shared.lua file up on pastebin, it'll alleviate any errors that you may have when pasting. But, as of right now, I get the following when running it.

[ERROR] addons/m60/lua/weapons/weapon_ttt_m60/shared.lua:220: attempt to call method 'SetRenderOrigin' (a nil value)
1. DrawWorldModel - addons/m60/lua/weapons/weapon_ttt_m60/shared.lua:220
2. unknown - addons/m60/lua/weapons/weapon_ttt_m60/shared.lua:180

Thanks for the attempt, anyways. Glad to see someone take an interest in it.
*Sam 2015년 7월 10일 오후 5시 27분 
And in the SWEP:DrawWorldModel code, change the if not IsValid(self.owner) part to:

if not IsValid( self.Owner ) then
self:SetRenderOrigin(self.Pos)
self:SetRenderAngles(self.Ang)
self:DrawModel( )
return
end

and the if not hand part to:
if not hand then
self:SetRenderOrigin(self.Pos)
self:SetRenderAngles(self.Ang)
self:DrawModel( )
return
end
*Sam 2015년 7월 10일 오후 5시 25분 
After experimenting a bit more, I think I found a better fix that should eliminate the problem all together. It seems as though for some reason the game will sometimes not draw the weapon immediately after drop, so you have to force it to draw. The CalcAbsolutePosition code keeps track of where the weapon ACTUALLY is in the world.
You may want to check and confirm that this code is working though, I may have missed something when copying it into here:

SWEP.Pos = nil
SWEP.Ang = nil

function SWEP:CalcAbsolutePosition(pos, ang)
self.Pos = pos
self.Ang = ang
return
end

SWEP.Offset = {
Pos = {
Up = 0,
Right = 1,
Forward = -3,
},
Ang = {
Up = 0,
Right = 0,
Forward = 0,
}
}

function SWEP:Think()
self:DrawWorldModel( )
end

function SWEP:RenderOverride()
self:DrawWorldModel()
end

function SWEP:OnDrop()
self.Owner = nil
end
FrostyIce  [작성자] 2015년 7월 10일 오후 3시 26분 
Alright, the gma has been updated. Thanks for the help. If you don't mind, I gave you credit in the change notes for the new code.
*Sam 2015년 7월 9일 오후 9시 09분 
So I was having a play around with this and I think I partially solved the problem with the world model being drawn stationary in the air after drop.

Inside the SWEP:DrawWorldModel() code, remove the first clause:

if not IsValid( self.Owner ) then return end

and replace it with:

if not IsValid( self.Owner ) then
self:SetRenderOrigin(self:GetNetworkOrigin())
self:SetRenderAngles(self:GetNetworkAngles())
self:DrawModel( )
return
end

This KIND OF fixes the problem, the gun will sometimes still be invisible initially but will become visible in the correct location after a time.
FrostyIce  [작성자] 2015년 4월 28일 오후 12시 54분 
LMG/HMG is just an abbreviated way of saying Light Machine Gun/Heavy Machine Gun, which is what the M60 is.
DH1806 2015년 4월 28일 오전 5시 04분 
Well I'll do it if you tell me what LMGs/HMGs is :D
FrostyIce  [작성자] 2015년 4월 27일 오후 2시 09분 
It usually occurs with the LMGs/HMGs, if you look at any of them, they will most likely occur. If you know of one that doesn't have this issue, link it, and I'll see how they calculate the dropped weapon's physics.