Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include('shared.lua')
- surface.CreateFont("TitreAmmo", {
- font = "Arial",
- size = 35,
- weight = 600,
- blursize = 0,
- scanlines = 0,
- antialias = true,
- underline = false,
- italic = false,
- strikeout = false,
- symbol = false,
- rotary = false,
- shadow = false,
- additive = false,
- outline = false,
- });
- surface.CreateFont("TextButtonAmmo1", {
- font = "Trebuchet18",
- size = 20,
- weight = 600,
- blursize = 0,
- scanlines = 0,
- antialias = true,
- underline = false,
- italic = false,
- strikeout = false,
- symbol = false,
- rotary = false,
- shadow = false,
- additive = false,
- outline = false,
- });
- surface.CreateFont("TextButtonAmmo2", {
- font = "Trebuchet18",
- size = 20,
- weight = 600,
- blursize = 0,
- scanlines = 0,
- antialias = true,
- underline = false,
- italic = false,
- strikeout = false,
- symbol = false,
- rotary = false,
- shadow = false,
- additive = false,
- outline = false,
- });
- surface.CreateFont("TextAmmoAuteur", {
- font = "Trebuchet18",
- size = 10,
- weight = 600,
- blursize = 0,
- scanlines = 0,
- antialias = true,
- underline = false,
- italic = false,
- strikeout = false,
- symbol = false,
- rotary = false,
- shadow = false,
- additive = false,
- outline = false,
- });
- surface.CreateFont("P1", {
- font = "Impact",
- size = 50,
- weight = 600,
- blursize = 0,
- scanlines = 0,
- antialias = true,
- underline = false,
- italic = false,
- strikeout = false,
- symbol = false,
- rotary = false,
- shadow = false,
- additive = false,
- outline = false,
- });
- surface.CreateFont("P2", {
- font = "Arial",
- size = 25,
- weight = 600,
- blursize = 0,
- scanlines = 0,
- antialias = true,
- underline = false,
- italic = false,
- strikeout = false,
- symbol = false,
- rotary = false,
- shadow = false,
- additive = false,
- outline = false,
- });
- -- Les 2 codes du dessus vont créer des font
- function ENT:Draw()
- self:DrawModel();
- local pos = self:GetPos()+ Vector(0, 0, 72)
- local ang = self:GetAngles()
- ang:RotateAroundAxis(ang:Up(), 90);
- ang:RotateAroundAxis(ang:Forward(), 90);
- if LocalPlayer():GetPos():Distance(self:GetPos()) < 400 then
- cam.Start3D2D(pos + ang:Up(), Angle(0, LocalPlayer():EyeAngles().y-90, 90), 0.25)
- draw.SimpleTextOutlined("Jobs", "TitreAmmo", 0, -48, Color(255,255,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_LEFT, 1, Color(25, 25, 25, 100));
- cam.End3D2D()
- end;
- end;
- --La fonctions au dessus va placer un texte au dessus du npc
- function NPCAmmo(ply)
- local StartMenu = vgui.Create("DFrame")
- StartMenu:SetSize(800, 880)
- StartMenu:Center()
- StartMenu:SetTitle("")
- StartMenu:SetSizable(false)
- StartMenu:SetDeleteOnClose(false)
- StartMenu:ShowCloseButton(false)
- StartMenu.Paint = function( self, w, h )
- draw.RoundedBoxEx( 4, 0, 0, w, h, Color( 20, 20, 20, 255 ) )
- StartMenu:MakePopup()
- end
- local ButtonJobs1 = vgui.Create( "DButton", StartMenu )
- ButtonJobs1:SetPos( 30, 100 )
- ButtonJobs1:SetText( "" )
- ButtonJobs1:SetTextColor( Color(255,255,255) )
- ButtonJobs1:SetSize( 740, 100 ) -- 740 100
- ButtonJobs1:SetFont("P2")
- function ButtonJobs1:Paint(w, h)
- draw.RoundedBox(0,0,0,w,h,Color(50,50,50,150))
- draw.SimpleText( "Job : Citoyen", "P2", 72, 15, Color( 255, 255, 255, 255 ), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
- draw.SimpleText( "Job : Citoyen", "P2", 500, 25, Color( 255, 255, 255, 255 ), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
- draw.SimpleText( "Job : Citoyen", "P2", 500, 25, Color( 255, 255, 255, 255 ), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
- end
- ButtonJobs1.DoClick = function()
- StartMenu:Close()
- end
- local icon = vgui.Create( "DModelPanel", Panel )
- icon:SetSize(2000,2000)
- icon:SetModel( "models/player/alyx.mdl" ) -- you can only change colors on playermodels
- icon:SetPos( 300, 10 )
- function icon:LayoutEntity( Entity ) return end -- disables default rotation
- function icon.Entity:GetPlayerColor() return Vector (4, 0, 0) end --we need to set it to a Vector not a Color, so the values are normal RGB values divided by 255.
- --local icon = vgui.Create( "DModelPanel", Panel )
- --icon:SetSize(100,100)
- --icon:SetModel( "models/kerry/imprisoned/male_09.mdl" )
- --function icon:LayoutEntity( Entity ) return end
- --function icon.Entity:GetPlayerColor() return Vector (4, 0, 0) end
- local ButtonQuitte = vgui.Create( "DButton", StartMenu )
- ButtonQuitte:SetPos( 755, 6 )
- ButtonQuitte:SetText( "" )
- ButtonQuitte:SetSize( 40, 40 )
- ButtonQuitte:SetFont("P1")
- function ButtonQuitte:Paint(w, h)
- draw.RoundedBox(0,0,0,w,h,Color(255,20,20,255))
- draw.SimpleText( "X", "P1", 20, 20, Color( 255, 255, 255, 255 ), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
- end
- ButtonQuitte.DoClick = function()
- StartMenu:Close()
- end
- end
- usermessage.Hook("NPCAmmo", NPCAmmo)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement