Voici un petit filesteal de "Alvis RP"
Download : [<b>Contenu masqué</b>]
SnxWs = SnxWs or {}
SnxWs.Config = SnxWs.Config or {}
SnxWs.ChangeSlot = SnxWs.ChangeSlot or {}
SnxWs.version = 1.82
SnxWs.Config = {
Colors = {
BG = Color(0,17,71), -- Couleur du fond
OutlineColor = Color(0,17,71), --Couleur des coutours
OutlineColorSelect = Color(1,52,129), --Couleur des coutours Selectionné
Shadow = Color(30,34,38,100), -- Couleur du shadow
TextColor = Color(255, 255, 255), -- couleur des textes
HoverCol = Color(30,34,38,100) -- Couleur du hover
},
--[[
GENERAL
]]
Opacity = 255, -- opacité du WS ( 0 a 255)
Font = "Roboto", -- Police utilisé
--[[
CONTOURS
]]
Contours = 1, -- Ici tu choisis le contours ( 1 = Tous le temps, 2 = Quand tu selectiones, 3 = contour sans selection)
epaisseurContour = 3, -- Ici tu choisis l'épaisseur des contours de ton WP ( default 2 )
--[[
SELECTION
]]
DrawHover = false, -- afficher le drawhover (les petits trucs blanc)
ShadowBox = false, -- true si tu veux un effet de shadow quand tu selectionnes une arme
ThemeHover = 1, -- style du hover Liste disponible bientot ! ( y'en a que 2 si vous avez des idées n'hesitez pas !)
--[[
SON
]]
-- Liste des sons disponible ici :
https://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index8f77.html
ActiveSound = true, -- activé les son ? true = oui false = non
SonScroll = "ambient/water/rain_drip1.wav", -- Son joué quand vous scrollé
SonChangement = "ambient/water/rain_drip3.wav", -- son joué quand vous choisisez l'arme (Clic Gauche)
--[[
POSITION
]]
Position = "center", -- choisi la position "left", "center", "right"
DrawNumber = false, -- cacher les chiffres au dessus du WP
PositionNumber = "Left", -- choisi la position des chiffres "Left", "Center", "Right" ( ca bug peut etre selon les tailles d'ecran)
--[[
CATEGORIE
]]
ActiveCat = false, -- afficher les categorie ? true = oui false = non, si oui le texte sera automatiquemennt placer sur la gauche
ArmesSlot = 3, -- slot ou sont placer les armes 1 - 6
NameCat = {"Construction", "RolePlay", "Armes", "Cartes", "Autres", "Outils"}, -- Choisi le nom des categories (il en faut 6 sinon ca ne marchera pas)
FormatCat = "%s. %s", -- Format du text categorie Actuelement "1. Construction" default : "%s. %s"
InVehicle = false,
--[[
CONFIG MISE A JOUR
]]
Taille = 10, -- taille du WS Max de 5 a 15 (5 c'est tres petits !)
useWatch = false -- True si vous utilisez GSmartWatch
}
SnxWs.ChangeSlot = {
--[[
Classedelarme = {
Name = "NOM DE l'arme", -- pour la traduction
Slot = 3 -- Slot de l'arme 1-6
}, ]]
gmod_tool = {
Name = "Pistolet d'outils",
Slot = 1
},
weapon_physcannon = {
Name = "Gravity Gun",
Slot = 1
},
weapon_physgun = {
Name = "Physics Gun",
Slot = 1
},
realistic_hook = {
Name = "Grappin",
Slot = 6
},
dsr_keys = {
Name = "Clés",
Slot = 2
},
weapon_rpt_finebook = {
Name = "Amande",
Slot = 6
},
weapon_awl_license = {
Name = "Licence d'arme",
Slot = 4
},
idcardpol7 = {
Name = "Carte Commandant",
Slot = 4
},
idcardpol2 = {
Name = "Carte Gardien Paix",
Slot = 4
},
idcardpol16 = {
Name = "Carte Raid",
Slot = 4
},
idcardpol9 = {
Name = "Carte Commissaire",
Slot = 4
},
idcardpol5 = {
Name = "Carte Major",
Slot = 4
},
idcardpol3 = {
Name = "Carte Brigadier",
Slot = 4
},
idcardpol6 = {
Name = "Carte Capitaine",
Slot = 4
},
idcardpol15 = {
Name = "Carte Bac",
Slot = 4
},
idcardpol13 = {
Name = "Carte Lieutenant",
Slot = 4
},
weapon_awl_license = {
Name = "Licence d'arme",
Slot = 4
},
weapon_hands = {
Name = "Main",
Slot = 2
},
weapon_adl_driverlicense = {
Name = "Permis de Conduire",
Slot = 4
},
glorifiedbanking_card = {
Name = "Carte Bancaire",
Slot = 4
},
idcard = {
Name = "Carte d'identité",
Slot = 4
},
aphone = {
Name = "Iphone 14",
Slot = 2
},
xinventory_inventoryswep = {
Name = "Sac à dos",
Slot = 2
},
re_hands = {
Name = "Mains",
Slot = 2
},
weapon_fists = {
Name = "Poings",
Slot = 3
},
weapon_r_restrains = {
Name = "Menottes",
Slot = 6
},
deguise_menu = {
Name = "Déguise Menu",
Slot = 2
},
dsr_medkit = {
Name = "Med Kit",
Slot = 6
},
dsr_battering_ram = {
Name = "Battering Ram",
Slot = 3
},
weapon_rpt_stungun = {
Name = "Taser",
Slot = 3
},
stunstick = {
Name = "Matraque",
Slot = 3
},
weapon_rdo_radio = {
Name = "Radio",
Slot = 2
},
weapon_rpt_handcuff = {
Name = "Menottes",
Slot = 6
},
dsr_megaphone = {
Name = "Megaphone",
Slot = 6
},
msystem_wep_controller = {
Name = "Controller",
Slot = 6
},
msystem_wep_hook = {
Name = "Attache",
Slot = 6
},
craftingmod_inventory_checker = {
Name = "Fouiller",
Slot = 6
},
slownls_hitman_tablet = {
Name = "Tablette",
Slot = 2
},
slownls_hitman_binoculars = {
Name = "Jumelle",
Slot = 3
},
dsr_metal_detector = {
Name = "Metal Detector",
Slot = 3
},
zgw_shovel = {
Name = "Pelle",
Slot = 3
},
zwf_wateringcan = {
Name = "Arrosoir",
Slot = 3
},
keypad_cracker = {
Name = "Keypad Kracker",
Slot = 6
},
deathdisturbance_pickpocket = {
Name = "Pickpocket",
Slot = 6
},
fire_axe = {
Name = "Hache à feu",
Slot = 3
},
fire_extinguisher = {
Name = "Extincteur",
Slot = 3
},
ztm_trashcollector = {
Name = "Trash Collecteur",
Slot = 3
}
}
--[[
NE PAS TOUCHER
]]
if CLIENT then
function ShadowBox(x, y, w, h)
if not SnxWs.Config.ShadowBox then return end
local GradHaut = surface.GetTextureID("vgui/gradient_down")
local GradBas = surface.GetTextureID("vgui/gradient_up")
local GradDroite = surface.GetTextureID("vgui/gradient-r")
local GradGauche = surface.GetTextureID("vgui/gradient-l")
surface.SetDrawColor(ColorAlpha(SnxWs.Config.Colors.Shadow, SnxWs.Config.Opacity))
surface.SetTexture(GradHaut)
surface.DrawTexturedRect(x, y, w, h * 0.4)
surface.SetTexture(GradBas)
surface.DrawTexturedRect(x, (h * 0.6 + 3) + y, w, h * 0.4)
surface.SetTexture(GradDroite)
surface.DrawTexturedRect((w - w * 0.1) + x, y, w * 0.1, h)
surface.SetTexture(GradGauche)
surface.DrawTexturedRect(x, y, w * 0.1, h)
end
function surface.DrawHover(x, y, w, h)
if not SnxWs.Config.DrawHover then return end
local lg = 4 * 3
if SnxWs.Config.ThemeHover <= 1 then
local w = w - 5
local h = h - 5
surface.SetDrawColor(255, 255, 255, SnxWs.Config.Opacity)
-- Coin hhaut gauche
surface.DrawRect(x + 5, y + 6, lg, 3)
surface.DrawRect(x + 5, y + 7, 3, lg)
-- coin bas droit
surface.DrawRect(x + w - 4, y + 3 + h - lg - 6, 3, lg)
surface.DrawRect(x + w - lg - 1, y + 3 + h - 8, lg, 3)
end
if SnxWs.Config.ThemeHover == 2 then
local w = w - 5
local h = h - 5
surface.SetDrawColor(255, 255, 255, SnxWs.Config.Opacity)
-- Coin hhaut gauche
surface.DrawRect(x + 5, y + 6, lg, 3)
surface.DrawRect(x + 5, y + 7, 3, lg)
-- coin bas gauche
surface.DrawRect(x + 5, y + h - 5, lg, 3)
surface.DrawRect(x + 5, y + h - 17, 3, lg)
-- coin haut droite
surface.DrawRect(x + w - 5, y + 6, 3, lg)
surface.DrawRect(x + w - 15, y + 6, lg, 3)
-- coin bas droit
surface.DrawRect(x + w - 5, y + h - 14, 3, lg)
surface.DrawRect(x + w - 15, y + h - 5, lg, 3)
end
end
--
function draw.OutlinedBox(x, y, w, h, thickness, clr)
surface.SetDrawColor(clr)
for i = 0, thickness - 1 do
surface.DrawOutlinedRect(x + i, y + i, w - i * 2, h - i * 2)
end
end
end
if SERVER then
-- Je regarde juste si vous avez la bonne versions
timer.Simple(.1, function()
local statstbl = {
servername = GetHostName(),
license = "MTX-SNX-WS-V" .. tostring(SnxWs.version) .. "-05/02/2021",
version = tostring(SnxWs.version)
}
http.Post("
http://rosewood-rp.net/addonmtx/addons/weapon/stats.php", statstbl, function()
-- onSuccess function
print("Done!")
end, function(message)
print(message)
end)
end)
end
-- Ajout du systeme de check version