Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --why it draws the PlayerModel the whole time when the swep is not selected.. i need to get the model icon disappears when im not in the drawweaponselection
- function SWEP:DrawWeaponSelection( x, y, wide, tall, alpha )
- -- Set us up the texture
- surface.SetDrawColor( 255, 255, 255, alpha )
- surface.SetMaterial( Material("idcard.png") )
- -- Lets get a sin wave to make it bounce
- local fsin = 0
- -- Borders
- y = y + 10
- x = x + 10
- wide = wide - 20
- -- Draw that mother
- surface.DrawTexturedRect( x + ( fsin ), y - ( fsin ), wide-fsin*2 , ( wide / 2 ) + ( fsin ) )
- -- Draw weapon info box
- self:PrintWeaponInfo( x + wide + 20, y + tall * 0.95, alpha )
- local LP2 = LocalPlayer()
- PIcon2 = PIcon2 or vgui.Create( "DModelPanel")
- PIcon2:SetSize(32,32)
- PIcon2:SetModel(LP2:GetModel())
- function PIcon2:LayoutEntity(ent) return end
- PIcon2:SetPos(x+32,y+98)
- local eyepos = PIcon.Entity:GetBonePosition(PIcon2.Entity:LookupBone("ValveBiped.Bip01_Head1"))
- eyepos:Add(Vector(0, 0, -2)) -- Move up slightly
- PIcon2:SetLookAt(eyepos)
- PIcon2:SetCamPos(eyepos-Vector(-20, 0, 0)) -- Move cam in front of eyes
- PIcon2.Entity:SetEyeTarget(eyepos-Vector(-20, 0, 0))
- draw.SimpleText(LP2:Nick(), "davinci_font_small", x+74, y+26, Color( 255, 255, 255, 255 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER )
- draw.SimpleText(LP2:SteamID64(), "davinci_font_small", x+74, y+41, Color( 255, 255, 255, 255 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER )
- draw.SimpleText(LP2:getDarkRPVar("job"), "davinci_font_small", x+74, y+55, Color( 255, 255, 255, 255 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER )
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement