- Initiateur de la discussion
_Remax
Geek
- Messages
- 345
- Score réaction
- 69
- Points
- 80
Salut tous le monde j'ai commençé la création d'un addons pour mon serveur tout fonctionne sur la partie test donc en solo mais quand je les installé sur mon serveur et que j'appuie sur le bouton 9 ( qui ouvre le panel ) les models que j'ai mis comme icon ne s'affiche plus
Code du panel :
Screen du serveur
Screen du solo
Code du panel :
Code:
function myfunc() if input.IsKeyDown( KEY_9 ) then local DermaPanel = vgui.Create( "DFrame" ) -- Creates the frame itself
DermaPanel:SetPos( 50,50 ) -- Position on the players screen
DermaPanel:SetSize( 600, 300 ) -- Size of the frame
DermaPanel:SetTitle( "PropsCrafting" ) -- Title of the frame
DermaPanel:SetVisible( true )
DermaPanel:SetDraggable( true ) -- Draggable by mouse?
DermaPanel:ShowCloseButton( true ) -- Show the close button?
DermaPanel:MakePopup() -- Show the frame
local bois = vgui.Create( "DModelPanel", Panel )
bois:SetParent( DermaPanel ) -- Set parent to our "DermaPanel"
bois:SetSize( 64, 64 )
bois:SetCamPos(-Vector( -50, 100, -50 ) ) -- Move cam in front of face
bois:SetPos( 50, 50 )
bois:SetModel( "models/props_wasteland/wood_fence02a.mdl" ) -- you can only change colors on playermodels
bois.DoClick = function ( btn ) local MenuButtonOptions = DermaMenu() -- Creates the menu MenuButtonOptions:AddOption("Acheter pour 5-R", function() net.Start("doShit") net.SendToServer() end ) -- Add options to the menu MenuButtonOptions:Open() -- Open the menu AFTER adding your options MenuButtonOption.DoClick() print "test"
end
local grillage = vgui.Create( "DModelPanel", Panel )
grillage:SetParent( DermaPanel ) -- Set parent to our "DermaPanel"
grillage:SetSize( 64, 64 )
grillage:SetPos( 150, 50 )
grillage:SetCamPos(-Vector( -50, 100, -50 ) ) -- Move cam in front of face
grillage:SetModel( "models/props_wasteland/interior_fence002d.mdl" ) -- you can only change colors on playermodels
grillage.DoClick = function ( btn ) local MenuButtonOptions = DermaMenu() -- Creates the menu MenuButtonOptions:AddOption("Acheter pour 10-R", function() net.Start("a") net.SendToServer() end ) -- Add options to the menu MenuButtonOptions:Open() -- Open the menu AFTER adding your options
end
local barriere = vgui.Create( "DModelPanel", Panel )
barriere:SetParent( DermaPanel ) -- Set parent to our "DermaPanel"
barriere:SetSize( 64, 64 )
barriere:SetPos( 250, 50 )
barriere:SetCamPos(-Vector( -50, 100, -50 ) ) -- Move cam in front of face
barriere:SetModel( "models/props_wasteland/barricade001a.mdl" ) -- you can only change colors on playermodels
barriere.DoClick = function ( btn ) local MenuButtonOptions = DermaMenu() -- Creates the menu MenuButtonOptions:AddOption("Acheter pour 1-R", function() net.Start("b") net.SendToServer() end ) -- Add options to the menu MenuButtonOptions:Open() -- Open the menu AFTER adding your options
end
local barrieree = vgui.Create( "DModelPanel", Panel )
barrieree:SetParent( DermaPanel ) -- Set parent to our "DermaPanel"
barrieree:SetSize( 64, 64 )
barrieree:SetPos( 350, 50 )
barrieree:SetCamPos(-Vector( -50, 100, -50 ) ) -- Move cam in front of face
barrieree:SetModel( "models/props_wasteland/barricade002a.mdl" ) -- you can only change colors on playermodels
barrieree.DoClick = function ( btn ) local MenuButtonOptions = DermaMenu() -- Creates the menu MenuButtonOptions:AddOption("Acheter pour 1-R", function() net.Start("c") net.SendToServer() end ) -- Add options to the menu MenuButtonOptions:Open() -- Open the menu AFTER adding your options
end
local blinder = vgui.Create( "DModelPanel", Panel )
blinder:SetParent( DermaPanel ) -- Set parent to our "DermaPanel"
blinder:SetSize( 64, 64 )
blinder:SetPos( 450, 50 )
blinder:SetCamPos(-Vector( -50, 100, -50 ) ) -- Move cam in front of face
blinder:SetModel( "models/props_lab/blastdoor001c.mdl" ) -- you can only change colors on playermodels
blinder.DoClick = function ( btn ) local MenuButtonOptions = DermaMenu() -- Creates the menu MenuButtonOptions:AddOption("Acheter pour 15-R", function() net.Start("d") net.SendToServer() end ) -- Add options to the menu MenuButtonOptions:Open() -- Open the menu AFTER adding your options
end
end
end
hook.Add("Think","twsgsh",myfunc)
Screen du serveur
Screen du solo
Pièces jointes
- client.png10.3 KB Vues: 26
- server.png10.2 KB Vues: 15