Aide config

  • Initiateur de la discussion
DOMISY

DOMISY

Bambi
Messages
86
Score réaction
7
Points
35
Bonjour,

Je voudrais savoir dans ce code ou mettre le nom du Job Restriction (En l'occurence TEAM_GUNDEALER) :

if money < price then
return false, "Not Enough Money"
elseif itm.allowed and !table.HasValue(itm.allowed, ply:Team()) then
return false, "Job Restriction"
elseif itm.customCheck and !itm.customCheck(ply, itm) then
local reason = ""
if itm.CustomCheckFailMsg then
if type(itm.CustomCheckFailMsg) == "function" then
reason = itm.CustomCheckFailMsg(ply, itm)
else
reason = tostring(itm.CustomCheckFailMsg)
end
end

Merci d'avance !
 
  • Administration
Numerix

Numerix

Admin
Membre du Staff
Messages
1 913
Score réaction
356
Points
315
elseif itm.allowed and !table.HasValue(itm.allowed, ply:Team()) and ply:Team() != TEAM_GUNDEALER then
 
  • Initiateur de la discussion
DOMISY

DOMISY

Bambi
Messages
86
Score réaction
7
Points
35
Merci bien
 
  • Initiateur de la discussion
DOMISY

DOMISY

Bambi
Messages
86
Score réaction
7
Points
35
Je n'avais pas testé mais tout les métiers y ont accès (Toujours)
 
  • Administration
Numerix

Numerix

Admin
Membre du Staff
Messages
1 913
Score réaction
356
Points
315
Code:
if money < price then
return false, "Not Enough Money"
elseif itm.allowed and !table.HasValue(itm.allowed, ply:Team()) then
return false, "Job Restriction"
elseif ply:Team() != TEAM_GUNDEALER then
return false, "Job restriction"
elseif itm.customCheck and !itm.customCheck(ply, itm) then
local reason = ""
if itm.CustomCheckFailMsg then
if type(itm.CustomCheckFailMsg) == "function" then
reason = itm.CustomCheckFailMsg(ply, itm)
else
reason = tostring(itm.CustomCheckFailMsg)
end
end
 
Discord d'entraide
Rejoignz-nous sur Discord