Probleme de dprogress

  • Initiateur de la discussion Shiki
  • Date de début
  • Initiateur de la discussion
Shiki

Shiki

Dev Message
Messages
10
Score réaction
3
Points
20
Bonjour, lorsque que mon codde est fini la bar de progression ne veux pas s'enlever avait vous une solution ?

Ci-joint le code et la photo:

local function naruto_pnj(pnj)

local ply = LocalPlayer()
local text_no = false
local text_yes = false

if IsValid(NARTUOPNJMenu) then NARTUOPNJMenu:Remove() end
NARTUOPNJMenu = vgui.Create( "DFrame" )
NARTUOPNJMenu:SetSize( 625, 395 )
NARTUOPNJMenu:Center()
NARTUOPNJMenu:SetTitle( "SENSEI SUITON" )
NARTUOPNJMenu:SetDraggable(false)
NARTUOPNJMenu:ShowCloseButton(false)
NARTUOPNJMenu:MakePopup()

local Menu = vgui.Create( "DPropertySheet" )
Menu:SetParent( NARTUOPNJMenu )
Menu:SetPos( 5, 30 )
Menu:SetSize( 610, 290 )


local button_yes = vgui.Create( "DButton", NARTUOPNJMenu )
button_yes:SetText( pnj.TextButtonYes )
button_yes:SetPos( 5, 322 )
button_yes:SetSize( 610, 30 )
button_yes.DoClick = function()
if text_yes == false then
if text_no == false then
text_yes = true
local text_yes = vgui.Create( "DButton", NARTUOPNJMenu )
text_yes:SetText( pnj.ReponseYes )
text_yes:SetTextColor( Color( 255, 255, 255 ) )
text_yes:SetPos( 260, 150 )
text_yes:SetSize( 200, 30 )
text_yes.Paint = function( self, w, h )
draw.RoundedBox( 9, 0, 0, w, h, Color( 20, 20, 20, 210 ) )
end
end
end
timer.Simple(1, function()
text_yes = false
if IsValid(NARTUOPNJMenu) then NARTUOPNJMenu:Remove() end
net.Start("naruto_pnj_setwhitelist")
net.WriteString("manhack_welder")
net.SendToServer()
end)
timer.Simple( 1, function()
local DProgress = vgui.Create( "DProgress" )
DProgress:SetPos( 800, 800 )
DProgress:SetSize( 300, 30 )
DProgress:SetFraction( 0.0 )
end)
timer.Simple( 5, function()
local DProgress = vgui.Create( "DProgress" )
DProgress:SetPos( 800, 800 )
DProgress:SetSize( 300, 30 )
DProgress:SetFraction( 0.10 )
end)
timer.Simple( 15, function()
local DProgress = vgui.Create( "DProgress" )
DProgress:SetPos( 800, 800 )
DProgress:SetSize( 300, 30 )
DProgress:SetFraction( 0.20 )
end)
timer.Simple( 20, function()
local DProgress = vgui.Create( "DProgress" )
DProgress:SetPos( 800, 800 )
DProgress:SetSize( 300, 30 )
DProgress:SetFraction( 0.30 )
end)
timer.Simple( 25, function()
local DProgress = vgui.Create( "DProgress" )
DProgress:SetPos( 800, 800 )
DProgress:SetSize( 300, 30 )
DProgress:SetFraction( 0.40 )
end)
timer.Simple( 30, function()
local DProgress = vgui.Create( "DProgress" )
DProgress:SetPos( 800, 800 )
DProgress:SetSize( 300, 30 )
DProgress:SetFraction( 0.50 )
end)
timer.Simple( 35, function()
local DProgress = vgui.Create( "DProgress" )
DProgress:SetPos( 800, 800 )
DProgress:SetSize( 300, 30 )
DProgress:SetFraction( 0.60 )
end)
timer.Simple( 40, function()
local DProgress = vgui.Create( "DProgress" )
DProgress:SetPos( 800, 800 )
DProgress:SetSize( 300, 30 )
DProgress:SetFraction( 0.70 )
end)
timer.Simple( 45, function()
local DProgress = vgui.Create( "DProgress" )
DProgress:SetPos( 800, 800 )
DProgress:SetSize( 300, 30 )
DProgress:SetFraction( 0.80 )
end)
timer.Simple( 50, function()
local DProgress = vgui.Create( "DProgress" )
DProgress:SetPos( 800, 800 )
DProgress:SetSize( 300, 30 )
DProgress:SetFraction( 0.90 )
end)
timer.Simple( 60, function()
local DProgress = vgui.Create( "DProgress" )
DProgress:SetPos( 800, 800 )
DProgress:SetSize( 300, 30 )
DProgress:SetFraction( 1.00 )
end)
end
local button_no = vgui.Create( "DButton", NARTUOPNJMenu )
button_no:SetText( pnj.TextButtonNo )
button_no:SetPos( 5, 355 )
button_no:SetSize( 610, 30 )
button_no.DoClick = function()
if text_yes == false then
if text_no == false then
text_no = true
local text_no = vgui.Create( "DButton", NARTUOPNJMenu )
text_no:SetText( pnj.ReponseNo )
text_no:SetTextColor( Color( 255, 255, 255 ) )
text_no:SetPos( 260, 150 )
text_no:SetSize( 220, 30 )
text_no.Paint = function( self, w, h )
draw.RoundedBox( 9, 0, 0, w, h, Color( 20, 20, 20, 210 ) )
end
end
end
timer.Simple(1, function()
text_no = false
if IsValid(NARTUOPNJMenu) then NARTUOPNJMenu:Remove() end
end)
end

local icon_pnj = vgui.Create( "DModelPanel", NARTUOPNJMenu )
icon_pnj:SetSize( 300, 400 )
icon_pnj:SetPos(-60, -80)
icon_pnj:SetModel( pnj.NarutoModelPnj )
icon_pnj:SetCamPos( Vector( 20, -30, 60 ) )
function icon_pnj.Entity:GetPlayerColor() return Vector ( 3, 0, 0 ) end
function icon_pnj:LayoutEntity( Entity ) return end

local icon_player = vgui.Create( "DModelPanel", NARTUOPNJMenu )
icon_player:SetSize( 300, 400 )
icon_player:SetPos(375, -80)
icon_player:SetModel( LocalPlayer():GetModel() )
icon_player:SetCamPos( Vector( 20, 30, 60 ) )
function icon_player.Entity:GetPlayerColor() return Vector ( 3, 0, 0 ) end
function icon_player:LayoutEntity( Entity ) return end

local eyepos = icon_pnj.Entity:GetBonePosition( icon_pnj.Entity:LookupBone( "ValveBiped.Bip01_Head1" ) )

icon_pnj:SetLookAt( eyepos )
icon_player:SetLookAt( eyepos )

local text_pnj = vgui.Create( "DButton", NARTUOPNJMenu )
text_pnj:SetText( pnj.textpnj )
text_pnj:SetTextColor( Color( 255, 255, 255 ) )
text_pnj:SetPos( 140, 110 )
text_pnj:SetSize( 200, 30 )
text_pnj.Paint = function( self, w, h )
draw.RoundedBox( 9, 0, 0, w, h, Color( 20, 20, 20, 210 ) )
end


end
 

Pièces jointes

  • Screenshot_1.png
    Screenshot_1.png
    3 MB Vues: 4
  • Initiateur de la discussion
Shiki

Shiki

Dev Message
Messages
10
Score réaction
3
Points
20
Voici le code
 

Pièces jointes

  • cl_yc_naruto_pnj.txt
    6.5 KB Vues: 2
Discord d'entraide
Rejoignz-nous sur Discord