Probleme VIP

  • Initiateur de la discussion
D

Darklightsky

Bambi
Messages
30
Score réaction
1
Points
40
Bonjour, J'ai Un Probleme Avec Le VIP Que J'Essaye D'installer, J'ai Regarder Plein De Site Et Vidéo, Et Quand Je Rentre Sur Le Serveur, Y'A Le Probleme Qu'Il N'Y A Plus Aucun Job, Tout Le Monde Peut Fly, Etc...
Bref Je VOus Donne Le LUA Que J'ai Fait Dernierement, Et S'Il Y A Un Problème Dites Le Moi Merci ^^

TEAM_TERRORISTE = DarkRP.createJob("Terroriste", {
color = Color(0, 0, 100, 255),
model = {"models/player/kuma/alqaeda_commando.mdl"},
description = [[]],
weapons = {"weapon_arc_atmcard","weapon_fists","weapon_jihadbomb"},
command = "terroriste",
max = 1,
salary = 250,
admin = 0,
vote = true,
hasLicense = false,
candemote = true,
PlayerDeath = function(ply)
if ply:Team() == TEAM_TERRORISTE
ply:changeTeam( TEAM_CITOYEN, true )
for k,v in pairs( player.GetAll() ) do
DarkRP.notify(v, 1, 4, "Le Terroriste Est Mort !!!! YOUPI !!!")
end
end
end,
canTalkToGlobal = false,
customCheck = function(ply) return ply:GetNWString("usergroup") == "VIP" or ply:GetNWString("usergroup") == "superadmin" or ply:GetNWString("usergroup") == "admin" or ply:GetNWString("usergroup") == "Modérateur-VIP" end,
CustomCheckFailMsg = "Ce métier est pour les VIP" -- Allows you to tell the user what went wrong when attempting to switch jobs
})
 
Dernière édition:
  • Initiateur de la discussion
D

Darklightsky

Bambi
Messages
30
Score réaction
1
Points
40
#lisez pas le DarkRP.notify ^^
 
SGCAtlantis

SGCAtlantis

Psychopathe
Messages
2 408
Score réaction
443
Points
300
salut tu as oublier une virgule a la fin de ton CustomCheckFailMsg
Code:
CustomCheckFailMsg = "Ce métier est pour les VIP", -- Allows you to tell the user what went wrong when attempting to switch jobs
 
  • Initiateur de la discussion
D

Darklightsky

Bambi
Messages
30
Score réaction
1
Points
40
ok
je vais voir
 
  • Initiateur de la discussion
D

Darklightsky

Bambi
Messages
30
Score réaction
1
Points
40
nan toujours pas
 
LucasGmod

LucasGmod

Nouveau né
Messages
25
Score réaction
0
Points
20
Salut, essaie avec cette ligne :

customCheck = function(ply) return CLIENT or
table.HasValue({"superadmin", "modo", "vip", "modo test", "admin", "helper", "superadmin"}, ply:GetNWString("usergroup"))
end,
CustomCheckFailMsg = "Ce métier est possédé par le VIP !",
})

Bien sur, tu change les groupes "modo test, admin" etc à ta sauce et surtout tes Grades doivent être identiques à ceux que tu as mis sur ton serveur
ex : sur le serveur : admin
sur le jobs.lua : "admin"

A appliquer aussi avec les majuscules :
sur le serveur : Admin
sur le jobs.lua : "Admin

en ésperant t'avoir aidé ^^.
 
  • Initiateur de la discussion
D

Darklightsky

Bambi
Messages
30
Score réaction
1
Points
40
Une Petite Vu :

[ERROR] addons/darkrpmodification/lua/darkrp_modules/tcb_hud_2/cl_main.lua:399: attempt to call global 'DrawEntityDisplay' (a nil value)
1. fn - addons/darkrpmodification/lua/darkrp_modules/tcb_hud_2/cl_main.lua:399
2. unknown - addons/ulib/lua/ulib/shared/hook.lua:109


[ERROR] addons/darkrpmodification/lua/darkrp_modules/tcb_hud_2/cl_main.lua:399: attempt to call global 'DrawEntityDisplay' (a nil value)
1. fn - addons/darkrpmodification/lua/darkrp_modules/tcb_hud_2/cl_main.lua:399
2. unknown - addons/ulib/lua/ulib/shared/hook.lua:109


[ERROR] addons/darkrpmodification/lua/darkrp_modules/tcb_hud_2/cl_main.lua:399: attempt to call global 'DrawEntityDisplay' (a nil value)
1. fn - addons/darkrpmodification/lua/darkrp_modules/tcb_hud_2/cl_main.lua:399
2. unknown -

Rien Avoir Mais Bon, Et J'ai Mis Exactement Les Meme Grade.
 
LucasGmod

LucasGmod

Nouveau né
Messages
25
Score réaction
0
Points
20
Va voir à la ligne 399 et fait un petit screen ou soit marque ce qu'il y a
 
  • Initiateur de la discussion
D

Darklightsky

Bambi
Messages
30
Score réaction
1
Points
40
ya pas de ligne 399, ou sinon dis moi quel fichier
si tu parle du tcb hud j'ai suppr et sa a rien fait
 
LucasGmod

LucasGmod

Nouveau né
Messages
25
Score réaction
0
Points
20
Tu avais gardé le fichier .zip par défaut du hud ou pas ? si oui remet le et dit moi
 
  • Initiateur de la discussion
D

Darklightsky

Bambi
Messages
30
Score réaction
1
Points
40
non
 
LucasGmod

LucasGmod

Nouveau né
Messages
25
Score réaction
0
Points
20
Toujours garder le fichier de base ... Enfin si tu l'as acheté sur scriptfodder tu peux le re-download
 
  • Initiateur de la discussion
D

Darklightsky

Bambi
Messages
30
Score réaction
1
Points
40
j'ai pas acheter x), c'est gratos sur tcb.com
 
  • Initiateur de la discussion
D

Darklightsky

Bambi
Messages
30
Score réaction
1
Points
40
ya ptet un prob ici : (tout le fichier)
TEAM_CITOYEN = DarkRP.createJob("Citoyen", {
color = Color(0, 255, 56, 255),
model = {
"models/player/Group01/male_04.mdl",
"models/player/Group01/male_02.mdl",
"models/player/Group01/male_06.mdl",
"models/player/Group01/male_07.mdl",
"models/player/Group01/male_08.mdl",
"models/player/Group01/male_09.mdl",
"models/player/Group01/female_01.mdl",
"models/player/Group01/female_03.mdl"
},
description = [[]],
weapons = {},
command = "citoyen",
max = 100,
salary = 250,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
})

TEAM_CUISINIER = DarkRP.createJob("Cuisinier", {
color = Color(255, 150, 150, 255),
model = {"models/player/alyx.mdl"},
description = [[]],
weapons = {},
command = "cuisinier",
max = 2,
salary = 400,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
})

TEAM_CHAUFFEURBUS = DarkRP.createJob("Chauffeur de bus", {
color = Color(220, 255, 0, 255),
model = {"models/player/gman_high.mdl"},
description = [[]],
weapons = {},
command = "chauffeurbus",
max = 3,
salary = 600,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
})

TEAM_MAFIA = DarkRP.createJob("Mafia", {
color = Color(150, 150, 150, 255),
model = {"models/player/tm_professional_var1.mdl"},
description = [[]],
weapons = {},
command = "mafia",
max = 4,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
})

TEAM_GENDARME = DarkRP.createJob("Gendarme", {
color = Color(0, 100, 255, 255),
model = {"models/player/santosrp/male_02_santosrp.mdl"},
description = [[]],
weapons = {"m9k_m92beretta"},
command = "gendarme",
max = 10,
salary = 500,
admin = 0,
vote = false,
hasLicense = true,
candemote = true,
})

TEAM_COMMISSAIRE = DarkRP.createJob("Commissaire", {
color = Color(0, 100, 255, 255),
model = {"models/player/police_agent/commissaire_02.mdl"},
description = [[]],
weapons = {"m9k_m92beretta", "m9k_g36"},
command = "commissaire",
max = 1,
salary = 800,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
})

TEAM_GIGN = DarkRP.createJob("GIGN", {
color = Color(0, 100, 255, 255),
model = {
"models/player/custom_player/legacy/ctm_gign.mdl",
"models/player/custom_player/legacy/ctm_gign_varianta.mdl"},
description = [[Groupe d'Intervention de la Gendarmerie Nationale]],
weapons = {"m9k_m92beretta", "m9k_acr", "m9k_mossberg590"},
command = "gign",
max = 5,
salary = 600,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
})

TEAM_MAIRE = DarkRP.createJob("Maire", {
color = Color(205, 0, 0, 255),
model = {"models/player/breen.mdl"},
description = [[]],
weapons = {},
command = "maire",
max = 1,
salary = 1000,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
PlayerDeath = function(ply)
if ply:Team() == TEAM_MAIRE
ply:changeTeam( TEAM_CITOYEN, true )
for k,v in pairs( player.GetAll() ) do
DarkRP.notify(v, 1, 4, "Le Maire Est Mort !!!!")
end
end
end,
})

TEAM_HITMAN = DarkRP.createJob("Tueur a gages", {
color = Color(100, 100, 100, 255),
model = {"models/player/leet.mdl"},
description = [[Vous êtes illégal, et vous ne voulez pas être repéré par le public]],
weapons = {"m9k_intervention"},
command = "hitman",
max = 1,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
})

TEAM_ANARCHISTE = DarkRP.createJob("Anarchiste", {
color = Color(0, 0, 0, 255),
model = {"models/csgoanarchist4pm.mdl"},
description = [[]],
weapons = {"m9k_vikhr"},
command = "anarchiste",
max = 4,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
})

TEAM_TERRORISTE = DarkRP.createJob("Terroriste", {
color = Color(0, 0, 100, 255),
model = {"models/player/kuma/alqaeda_commando.mdl"},
description = [[]],
weapons = {"weapon_arc_atmcard","weapon_fists","weapon_jihadbomb"},
command = "terroriste",
max = 1,
salary = 250,
admin = 0,
vote = true,
hasLicense = false,
candemote = true,
PlayerDeath = function(ply)
if ply:Team() == TEAM_TERRORISTE
ply:changeTeam( TEAM_CITOYEN, true )
for k,v in pairs( player.GetAll() ) do
DarkRP.notify(v, 1, 4, "Le Terroriste Est Mort !!!! YOUPI !!!")
end
end
end,
customCheck = function(ply) return CLIENT or
table.HasValue({"superadmin", "Modérateur-VIP", "VIP", "admin"}, ply:GetNWString("usergroup"))
end,
CustomCheckFailMsg = "Ce métier est possédé par les VIP !",
})

TEAM_ADMIN = DarkRP.createJob("Admin en service", {
color = Color(150, 50, 255, 255),
model = {"models/player/anon/anon.mdl"},
description = [[]],
weapons = {},
command = "admin",
max = 100,
salary = 0,
admin = 4,
vote = false,
hasLicense = true,
candemote = false,
})

TEAM_HORROR = DarkRP.createJob("clown tueur", {
color = Color(255, 0, 0, 255),
model = {"models/player/ninja/l4d2/clown/clown.mdl"},
description = [[tu est un clown tueur.]],
weapons = {"m9k_machete","m9k_knife"},
command = "clown",
max = 2,
salary = 10,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
})

--[[---------------------------------------------------------------------------
Define which team joining players spawn into and what team you change to if demoted
---------------------------------------------------------------------------]]
GAMEMODE.DefaultTeam = TEAM_CITOYEN


--[[---------------------------------------------------------------------------
Define which teams belong to civil protection
Civil protection can set warrants, make people wanted and do some other police related things
---------------------------------------------------------------------------]]
GAMEMODE.CivilProtection = {
[TEAM_GENDARME] = true,
[TEAM_COMMISSAIRE] = true,
[TEAM_GIGN] = true,
}

--[[---------------------------------------------------------------------------
Jobs that are hitmen (enables the hitman menu)
---------------------------------------------------------------------------]]
DarkRP.addHitmanTeam(TEAM_HITMAN)
 
LucasGmod

LucasGmod

Nouveau né
Messages
25
Score réaction
0
Points
20
Bah tu peux le re-download alors, remet le dans addons/darkrpmodification/lua/darkrp_modules/, reboot ton serveur, et dit moi ;)
 
  • Initiateur de la discussion
D

Darklightsky

Bambi
Messages
30
Score réaction
1
Points
40



local HUD = {}

-- Edit settings here.
HUD.X = "left" -- left / center / right
HUD.Y = "bottom"; -- bottom / center / top

HUD.HealthColor = Color(192, 57, 43, 255)
HUD.ArmorColor = Color(41, 128, 185, 255)

-- Don't edit anything below this line.
HUD.Width = 400
HUD.Height = 150

HUD.Border = 15

HUD.PosX = 0
HUD.PosY = 0


local hideHUDElements = {
["DarkRP_HUD"] = true,
["DarkRP_EntityDisplay"] = true,
["DarkRP_ZombieInfo"] = true,
["DarkRP_LocalPlayerHUD"] = true,
["DarkRP_Hungermod"] = true,
["DarkRP_Agenda"] = true,
}


local function hideElements(name)

if name == "CHudHealth" or name == "CHudBattery" or name == "CHudSuitPower" then
return false
end

if hideHUDElements[name] then
return false
end

end
hook.Add("HUDShouldDraw", "hideElements", hideElements)


if HUD.X == "left" then
HUD.PosX = HUD.Border
elseif HUD.X == "center" then
HUD.PosX = ScrW() / 2 - HUD.Width / 2
elseif HUD.X == "right" then
HUD.PosX = ScrW() - HUD.Border
else
HUD.PosX = HUD.Border
end

if HUD.Y == "bottom" then
HUD.PosY = ScrH() - HUD.Height - HUD.Border
elseif HUD.Y == "center" then
HUD.PosY = ScrH() / 2 - HUD.Height / 2
elseif HUD.Y == "top" then
HUD.PosY = HUD.Border
else
HUD.PosY = ScrH() - Border
end


local function formatNumber(n)
if not n then return "" end
if n >= 1e14 then return tostring(n) end
n = tostring(n)
local sep = sep or ","
local dp = string.find(n, "%.") or #n+1
for i=dp-4, 1, -3 do
n = n:sub(1, i) .. sep .. n:sub(i+1)
end
return n
end



HUD.BHeight = HUD.Height / 2 - 15
HUD.BPosY = HUD.PosY + HUD.Height / 2 + HUD.Border

HUD.BHeight1 = HUD.BHeight / 2 - 10
HUD.BPosY1 = HUD.BPosY + 3
HUD.BPosY2 = HUD.BPosY + 27

HUD.BarWidth = HUD.Width - 90

HUD.HHeight = HUD.Height / 2 + 11

local function Base()

-- Background
draw.RoundedBox(4, HUD.PosX-1, HUD.PosY-1, HUD.Width+2, HUD.Height+2, Color(30,30,30,255))
draw.RoundedBox(4, HUD.PosX, HUD.PosY, HUD.Width, HUD.Height, Color(50,50,50,255))

-- Sections
draw.RoundedBoxEx(4, HUD.PosX, HUD.BPosY, HUD.Width, HUD.BHeight, Color(70,70,70,255), false, false, true, true)
draw.RoundedBoxEx(4, HUD.PosX + HUD.Width - 50, HUD.PosY, 50, HUD.HHeight, Color(60,60,60,255), false, true, false, false)
draw.RoundedBoxEx(4, HUD.PosX, HUD.PosY, 75, HUD.HHeight, Color(70,70,70,255), true, false, false, false)

-- Borders
draw.RoundedBox(0, HUD.PosX, HUD.BPosY-4, HUD.Width, 2, Color(30,30,30,255))
draw.RoundedBox(0, HUD.PosX, HUD.BPosY-2, HUD.Width, 2, Color(90,90,90,255))

draw.RoundedBox(0, HUD.PosX + HUD.Width - 50 - 4, HUD.PosY, 2, HUD.HHeight, Color(30,30,30,255))
draw.RoundedBox(0, HUD.PosX + HUD.Width - 50 - 2, HUD.PosY, 2, HUD.HHeight, Color(90,90,90,255))

draw.RoundedBox(0, HUD.PosX + 75 + 2, HUD.PosY, 2, HUD.HHeight, Color(30,30,30,255))
draw.RoundedBox(0, HUD.PosX + 75, HUD.PosY, 2, HUD.HHeight, Color(90,90,90,255))

end

local function PlayerModel()

PlayerModel = vgui.Create("DModelPanel")
function PlayerModel:LayoutEntity( Entity ) return end
PlayerModel:SetModel( LocalPlayer():GetModel() )
PlayerModel:SetPos(HUD.PosX, HUD.PosY)
PlayerModel:SetSize(75, HUD.HHeight)
PlayerModel:SetCamPos(Vector( 16, 0, 65 ))
PlayerModel:SetLookAt(Vector( 0, 0, 65 ))

timer.Create( "UpdatePlayerModel", 0.5, 0, function()
if LocalPlayer():GetModel() != PlayerModel.Entity:GetModel() then
PlayerModel:Remove()
PlayerModel = vgui.Create("DModelPanel")
function PlayerModel:LayoutEntity( Entity ) return end
PlayerModel:SetModel( LocalPlayer():GetModel())
PlayerModel:SetPos(HUD.PosX, HUD.PosY)
PlayerModel:SetSize(75, HUD.HHeight)
PlayerModel:SetCamPos(Vector( 16, 0, 65 ))
PlayerModel:SetLookAt(Vector( 0, 0, 65 ))
end
end)

end

hook.Add("InitPostEntity", "PlayerModel", PlayerModel)

local function Health()

-- Values
local Health = LocalPlayer():Health() or 0
local FullHealth = LocalPlayer():Health() or 0
if Health < 0 then Health = 0 elseif Health > 100 then Health = 100 end
local DrawHealth = math.Min(Health/GAMEMODE.Config.startinghealth, 1)

-- Title
draw.DrawText("Vie", "TCB_BebasNeue_1", HUD.PosX + 10 + 1, HUD.BPosY1 + 6 + 1, Color(0, 0, 0, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
draw.DrawText("Vie", "TCB_BebasNeue_1", HUD.PosX + 10, HUD.BPosY1 + 6, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)

-- Background Bar
draw.RoundedBox(4, HUD.PosX + 80, HUD.BPosY1 + 5, HUD.BarWidth, HUD.BHeight1, Color(30,30,30,255))

-- Bar
if Health != 0 then
draw.RoundedBox(4, HUD.PosX + 80 + 1, HUD.BPosY1 + 5 + 1, (HUD.BarWidth - 2) * DrawHealth, HUD.BHeight1 - 2, HUD.HealthColor)
end

draw.DrawText(FullHealth, "TCB_BebasNeue_1", HUD.PosX + 80 + HUD.BarWidth / 2, HUD.BPosY1 + 6 + 1, Color(0, 0, 0, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
draw.DrawText(FullHealth, "TCB_BebasNeue_1", HUD.PosX + 80 + HUD.BarWidth / 2, HUD.BPosY1 + 6, Color(255, 255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)

end

local function Armor()

-- Values
local Armor = LocalPlayer():Armor() or 0
local FullArmor = LocalPlayer():Armor() or 0
if Armor < 0 then Armor = 0 elseif Armor > 100 then Armor = 100 end

-- Title
draw.DrawText("Armure", "TCB_BebasNeue_1", HUD.PosX + 10 + 1, HUD.BPosY2 + 6 + 1, Color(0, 0, 0, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
draw.DrawText("Armure", "TCB_BebasNeue_1", HUD.PosX + 10, HUD.BPosY2 + 6, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)

-- Background Bar
draw.RoundedBox(4, HUD.PosX + 80, HUD.BPosY2 + 5, HUD.BarWidth, HUD.BHeight1, Color(30,30,30,255))

-- Bar
if Armor != 0 then
draw.RoundedBox(4, HUD.PosX + 80 + 1, HUD.BPosY2 + 5 + 1, (HUD.BarWidth - 2) * Armor / 100, HUD.BHeight1 - 2, HUD.ArmorColor)
end

draw.DrawText(Armor, "TCB_BebasNeue_1", HUD.PosX + 80 + HUD.BarWidth / 2, HUD.BPosY2 + 6 + 1, Color(0, 0, 0, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
draw.DrawText(Armor, "TCB_BebasNeue_1", HUD.PosX + 80 + HUD.BarWidth / 2, HUD.BPosY2 + 6, Color(255, 255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)

end

local function PlayerInfo()

-- Values
local VAL_Name = LocalPlayer():Nick() or ""
local VAL_Job = LocalPlayer():getDarkRPVar("job") or ""
local VAL_Wallet = "€"..formatNumber(LocalPlayer():getDarkRPVar("money") or 0)
local VAL_Salary = "€"..formatNumber(LocalPlayer():getDarkRPVar("salary") or 0)

-- Name
draw.DrawText("Nom: ", "TCB_BebasNeue_2", HUD.PosX + 85 + 1, HUD.PosY + 18 * 0 + 2.5 * 1 + 1, Color(0,0,0,255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
draw.DrawText("Nom: ", "TCB_BebasNeue_1", HUD.PosX + 85, HUD.PosY + 18 * 0 + 2.5 * 1, Color(192, 57, 43, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
draw.DrawText(VAL_Name, "TCB_BebasNeue_1", HUD.PosX + 140 + 1, HUD.PosY + 18 * 0 + 2.5 * 1 + 1, Color(0, 0, 0, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
draw.DrawText(VAL_Name, "TCB_BebasNeue_1", HUD.PosX + 140, HUD.PosY + 18 * 0 + 2.5 * 1, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)

-- Job
draw.DrawText("Job: ", "TCB_BebasNeue_1", HUD.PosX + 85 + 1, HUD.PosY + 18 * 1 + 2.5 * 2 + 1, Color(0, 0, 0, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
draw.DrawText("Job: ", "TCB_BebasNeue_1", HUD.PosX + 85, HUD.PosY + 18 * 1 + 2.5 * 2, Color(192, 57, 43, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
draw.DrawText(VAL_Job, "TCB_BebasNeue_1", HUD.PosX + 140 + 1, HUD.PosY + 18 * 1 + 2.5 * 2 + 1, Color(0, 0, 0, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
draw.DrawText(VAL_Job, "TCB_BebasNeue_1", HUD.PosX + 140, HUD.PosY + 18 * 1 + 2.5 * 2, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)

-- Wallet
draw.DrawText("Monnaie: ", "TCB_BebasNeue_1", HUD.PosX + 85 + 1, HUD.PosY + 18 * 2 + 2.5 * 3 + 1, Color(0, 0, 0, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
draw.DrawText("Monnaie: ", "TCB_BebasNeue_1", HUD.PosX + 85, HUD.PosY + 18 * 2 + 2.5 * 3, Color(0, 255, 0, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
draw.DrawText(VAL_Wallet, "TCB_BebasNeue_1", HUD.PosX + 140 + 1, HUD.PosY + 18 * 2 + 2.5 * 3 + 1, Color(0, 0, 0, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
draw.DrawText(VAL_Wallet, "TCB_BebasNeue_1", HUD.PosX + 140, HUD.PosY + 18 * 2 + 2.5 * 3, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)

-- Salary
draw.DrawText("Salaire: ", "TCB_BebasNeue_1", HUD.PosX + 85 + 1, HUD.PosY + 18 * 3 + 2.5 * 4 + 1, Color(0, 0, 0, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
draw.DrawText("Salaire: ", "TCB_BebasNeue_1", HUD.PosX + 85, HUD.PosY + 18 * 3 + 2.5 * 4, Color(0, 255, 0, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
draw.DrawText(VAL_Salary, "TCB_BebasNeue_1", HUD.PosX + 140 + 1, HUD.PosY + 18 * 3 + 2.5 * 4 + 1, Color(0, 0, 0, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
draw.DrawText(VAL_Salary, "TCB_BebasNeue_1", HUD.PosX + 140, HUD.PosY + 18 * 3 + 2.5 * 4, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)

end

local IconLicense = "icon16/page_red.png"
local IconWanted = "icon16/exclamation.png"

local function PlayerIcons()

if LocalPlayer():getDarkRPVar("HasGunlicense") then
surface.SetDrawColor(255,255,255,255)
else
surface.SetDrawColor(25,25,25,255)
end
surface.SetMaterial(Material(IconLicense))
surface.DrawTexturedRect( HUD.PosX + HUD.Width - 50 + 15, HUD.PosY + 15, 20, 20)

if LocalPlayer():getDarkRPVar("wanted") then
surface.SetDrawColor(255,255,255,255)
else
surface.SetDrawColor(25,25,25,255)
end
surface.SetMaterial(Material(IconWanted))
surface.DrawTexturedRect( HUD.PosX + HUD.Width - 50 + 15, HUD.PosY + 50, 20, 20)

end



local function Agenda()
local agenda = LocalPlayer():getAgendaTable()
if not agenda then return end

draw.RoundedBox(10, 10, 10, 460, 110, Color(0, 0, 0, 155))
draw.RoundedBox(10, 12, 12, 456, 106, Color(51, 58, 51,100))
draw.RoundedBox(10, 12, 12, 456, 20, Color(0, 0, 70, 100))

draw.DrawNonParsedText(agenda.Title, "DarkRPHUD1", 30, 12, Color(255, 0, 0, 255), 0)

local text = LocalPlayer():getDarkRPVar("agenda") or ""

text = text:gsub("//", "\n"):gsub("\\n", "\n")
text = DarkRP.textWrap(text, "DarkRPHUD1", 440)
draw.DrawNonParsedText(text, "DarkRPHUD1", 30, 35, Color(255, 255, 255, 255), 0)
end

local VoiceChatTexture = surface.GetTextureID("voice/icntlk_pl")
local function DrawVoiceChat()
if LocalPlayer().DRPIsTalking then
local chbxX, chboxY = chat.GetChatBoxPos()

local Rotating = math.sin(CurTime()*3)
local backwards = 0
if Rotating < 0 then
Rotating = 1-(1+Rotating)
backwards = 180
end
surface.SetTexture(VoiceChatTexture)
surface.SetDrawColor(Color(140,0,0,180))
surface.DrawTexturedRectRotated(ScrW() - 100, chboxY, Rotating*96, 96, backwards)
end
end

CreateConVar("DarkRP_LockDown", 0, {FCVAR_REPLICATED, FCVAR_SERVER_CAN_EXECUTE})
local function LockDown()
local chbxX, chboxY = chat.GetChatBoxPos()
if util.tobool(GetConVarNumber("DarkRP_LockDown")) then
local cin = (math.sin(CurTime()) + 1) / 2
local chatBoxSize = math.floor(ScrH() / 4)
draw.DrawNonParsedText(DarkRP.getPhrase("lockdown_started"), "ScoreboardSubtitle", chbxX, chboxY + chatBoxSize, Color(cin * 255, 0, 255 - (cin * 255), 255), TEXT_ALIGN_LEFT)
end
end

if HUD.Y != "top" then
ArrestedY = HUD.PosY - 23
ArrestedX = HUD.PosX + HUD.Width / 2
else
ArrestedY = ScrH() - ScrH()/12
ArrestedX = ScrW()/2
end

local Arrested = function() end

usermessage.Hook("GotArrested", function(msg)
local StartArrested = CurTime()
local ArrestedUntil = msg:ReadFloat()

Arrested = function()
if CurTime() - StartArrested <= ArrestedUntil and LocalPlayer():getDarkRPVar("Arrested") then
draw.DrawNonParsedText(DarkRP.getPhrase("youre_arrested", math.ceil(ArrestedUntil - (CurTime() - StartArrested))), "DarkRPHUD1", ArrestedX, ArrestedY, Color(255, 255, 255, 255), 1)
elseif not LocalPlayer():getDarkRPVar("Arrested") then
Arrested = function() end
end
end
end)

local AdminTell = function() end

usermessage.Hook("AdminTell", function(msg)
timer.Destroy("DarkRP_AdminTell")
local Message = msg:ReadString()

AdminTell = function()
draw.RoundedBox(4, 10, 10, ScrW() - 20, 100, Color(0, 0, 0, 200))
draw.DrawNonParsedText(DarkRP.getPhrase("listen_up"), "GModToolName", ScrW() / 2 + 10, 10, Color(255, 255, 255, 255), 1)
draw.DrawNonParsedText(Message, "ChatFont", ScrW() / 2 + 10, 80, Color(200, 30, 30, 255), 1)
end

timer.Create("DarkRP_AdminTell", 10, 1, function()
AdminTell = function() end
end)
end)

local function DrawWantedInfo(ply)
if not ply:Alive() then return end

local pos = ply:EyePos()
if not pos:isInSight({LocalPlayer(), ply}) then return end

pos.z = pos.z + 10
pos = pos:ToScreen()
pos.y = pos.y - 50

local wantedText = "WANTED" --DarkRP.getPhrase("wanted", tostring(ply:getDarkRPVar("wantedReason")))

draw.RoundedBox(4, pos.x - 51, pos.y - 100 - 5, 100+2, 30+2, Color(30, 30, 30, 255))
draw.RoundedBox(4, pos.x - 50, pos.y - 99 - 5, 100, 30, Color(70, 70, 70, 255))

draw.DrawText(wantedText, "TCB_BebasNeue_1", pos.x + 1, pos.y - 99, Color(0, 0, 0, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
draw.DrawText(wantedText, "TCB_BebasNeue_1", pos.x, pos.y - 100, Color(255, 0, 0, 200), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end

function GAMEMODE:DrawDeathNotice(x, y)
if not GAMEMODE.Config.showdeaths then return end
self.BaseClass:DrawDeathNotice(x, y)
end

local function DisplayNotify(msg)
local txt = msg:ReadString()
GAMEMODE:AddNotify(txt, msg:ReadShort(), msg:ReadLong())
surface.PlaySound("buttons/lightswitch2.wav")

-- Log to client console
print(txt)
end
usermessage.Hook("_Notify", DisplayNotify)

function DisableDrawInfo()
return false
end
hook.Add("HUDDrawTargetID", "DisableDrawInfo", DisableDrawInfo)


local function DrawTCB()

-- Custom
Base()
Health()
Armor()
PlayerInfo()
PlayerIcons()

-- Default
Agenda()
DrawVoiceChat()
LockDown()

Arrested()
AdminTell()

--
DrawEntityDisplay()

end
hook.Add("HUDPaint", "DrawTCB", DrawTCB)
 
  • Initiateur de la discussion
D

Darklightsky

Bambi
Messages
30
Score réaction
1
Points
40
Laissez Tombez, Il M'as Virer Pour Sa, Merci Pour Ceux Qui Ont Contribuer A M'Aider Mais C'est Fini
Désolé De Vous Avoir Dérangé Pour Rien.
Cordialement.
 
Discord d'entraide
Rejoignz-nous sur Discord