- Initiateur de la discussion
anthonin lahterman
Geek suprême
- Messages
- 589
- Score réaction
- 124
- Points
- 150
Salut, petit hook qui merde, je ne sais pas d'ou cela vient, merci pour votre aide sans laquelle jue ne pourai avancer < 3
client:
server:
client:
Code:
for i=10,100 do surface.CreateFont("jimmyFont"..i, { font = "Arial", size = i, weight = 2000
})
end
net.Receive('Derma',function() local BaseMot = vgui.Create( "DFrame" ) BaseMot:SetSize( 500, 200 ) BaseMot:Center() BaseMot:SetTitle( "Etat civil" ) BaseMot:SetVisible( true ) BaseMot:SetDraggable( false ) BaseMot:ShowCloseButton( false ) BaseMot:MakePopup() BaseMot.Paint = function(self,w,h) draw.RoundedBox(0,0,0,w,h,Color(200,200,200,255)) draw.RoundedBoxEx(0,0,0,w,35,Color(0,0,0,200)) draw.SimpleText('Entrez le mot magique!', "jimmyFont29", 250, 45, color_black, TEXT_ALIGN_CENTER ) end local TextEntry = vgui.Create( "DTextEntry", BaseMot ) TextEntry:SetPos( 5, 55+25 ) TextEntry:SetSize( BaseMot:GetWide()-10, 25 ) TextEntry:SetText( "Entrez le mot magique!" ) TextEntry.OnGetFocus = function(self) if TextEntry:GetText() == "Entrez le mot magique!" then TextEntry:SetText("") end end TextEntry.OnLoseFocus = function(self) if TextEntry:GetText() == "" then self:SetText("Entrez le mot magique!") end end local DermaButton = vgui.Create( "DButton", BaseMot ) DermaButton:SetText( "Valider..." ) DermaButton:SetPos( 5, 50+25+35 ) DermaButton:SetFont('jimmyFont20') DermaButton:SetTextColor(color_white) DermaButton:SetSize( BaseMot:GetWide()-10, 35 ) DermaButton.OnCursorEntered = function(self) DermaButton:SetTextColor(color_black) surface.PlaySound("UI/buttonrollover.wav") end DermaButton.OnCursorExited = function(self) DermaButton:SetTextColor(color_white) end DermaButton.Paint = function(self,w,h) draw.RoundedBox(0,0,0,w,h,Color(41,41,41,200)) end DermaButton.DoClick = function() net.Start('javadanet1') net.WriteString(TextEntry:GetValue()) net.SendToServer() end local DermaButton2 = vgui.Create( "DButton", v ) DermaButton2:SetText( "Je veux lire les regles!" ) DermaButton2:SetPos( 5, 100+25+35 ) DermaButton2:SetFont('jimmyFont20') DermaButton2:SetTextColor(color_white) DermaButton2:SetSize( BaseMot:GetWide()-10, 35 ) DermaButton2.OnCursorEntered = function(self) DermaButton2:SetTextColor(color_black) surface.PlaySound("UI/buttonrollover.wav") end DermaButton2.OnCursorExited = function(self) DermaButton2:SetTextColor(color_white) end DermaButton2.Paint = function(self,w,h) draw.RoundedBox(0,0,0,w,h,Color(0,0,0,200)) end DermaButton2.DoClick = function() BaseMot:Remove() end
end)
Code:
util.AddNetworkString("Derma")
hook.Add( "PlayerInitialSpawn", function(ply)
net.Start("Derma")
net.Send(ply)
end)