SHOW:
|
|
- or go back to the newest paste.
| 1 | - | local cats = { } // Don't be afraid. I didn't hurt any cat (I don't like them tho) xD
|
| 1 | + | AddCSLuaFile() |
| 2 | if CLIENT then | |
| 3 | - | for k, v in pairs(DarkRP.getCategories()) do |
| 3 | + | |
| 4 | - | if k == "jobs" then continue end |
| 4 | + | if IsValid(ROITE_PANEL) then // Checks if the panel exists |
| 5 | ROITE_PANEL:Remove() // Removes the panel, so you won't see a duplicate after refreshing the script | |
| 6 | - | for k2, v2 in pairs(v) do |
| 6 | + | end |
| 7 | - | if !cats[k] then cats[k] = { } end
|
| 7 | + | |
| 8 | - | for k3, v3 in pairs(v2.members or { }) do
|
| 8 | + | local DermaPanel = vgui.Create( "DFrame" ) |
| 9 | - | cats[k][#cats[k]+1] = v3 |
| 9 | + | ROITE_PANEL = DermaPanel // Assigns panel to a global value that can be accessed anywhere |
| 10 | - | cats[k][#cats[k]].cat = v2 |
| 10 | + | DermaPanel:SetPos( 100, 100 ) |
| 11 | - | end |
| 11 | + | DermaPanel:SetSize( 300, 200 ) |
| 12 | - | end |
| 12 | + | DermaPanel:SetTitle( "Magasin de Vêtements" ) |
| 13 | - | end |
| 13 | + | DermaPanel:SetDraggable( true ) |
| 14 | DermaPanel:Center() | |
| 15 | DermaPanel:ShowCloseButton( false ) | |
| 16 | DermaPanel:SetPaintShadow( true ) | |
| 17 | DermaPanel:MakePopup() | |
| 18 | local DermaButton = vgui.Create( "DButton" ) | |
| 19 | DermaButton:SetParent( DermaPanel ) | |
| 20 | DermaButton:SetText( "Say hi" ) | |
| 21 | DermaButton:SetPos( 25, 50 ) | |
| 22 | DermaButton:SetSize( 250, 30 ) | |
| 23 | DermaButton.DoClick = function() | |
| 24 | Close() | |
| 25 | end | |
| 26 | end |