Probleme job vip lua error

  • Initiateur de la discussion
Eliott2510

Eliott2510

Geek
Messages
27
Score réaction
3
Points
80
bonjour, voila mes jobs de mon serveur marche tres bien mais un soucis je suis en train de creer mes job vip avec le grade VIP que j'ai creer dans l'ulx et lorsque je rajoute la ligne
"customCheck = function(ply) return ply:GetNWString("usergroup") == "VIP" end" mon serv bug et je ne vois plut les jobs dans f4 alors que celui la marche :

TEAM_ADMIN = DarkRP.createJob("Staff De AmazingLife", {
color = Color(95, 61, 168, 255),
model = {"models/player/anon/anon.mdl"},
description = [[Job pour les admins .]],
weapons = {"weapon_fists", "itemstore_checker", "idcard", "weapon_arc_atmcard", "weapon_r_handcuffs", "weaponchecker"},
command = "Staff",
max = 0,
salary = 50000,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
customCheck = function(ply) return CLIENT or
table.HasValue({"admin", "superadmin"}, ply:GetNWString("usergroup"))
end,
CustomCheckFailMsg = "vous n'êtes pas un membre du staff.",
})

donc je ne comprend pas et l'erreur que j c ça

------- End of Simplerr error -------1. error - [C]:-12. doInclude - gamemodes/darkrp/gamemode/libraries/simplerr.lua:5303. loadCustomDarkRPItems - gamemodes/darkrp/gamemode/libraries/modificationloader.lua:1384. Call - gamemodes/darkrp/gamemode/libraries/modificationloader.lua:1495. unknown - gamemodes/darkrp/gamemode/init.lua:111[ERROR] Lua is unable to understand file "darkrp_customthings/jobs.lua" because its author made a mistake around line number 129.The best help I can give you is this:There is an opening '{' bracket at line 107, but this bracket is never closed or not closed in time. It was expected to be closed before the 'customCheck' at line 129.Hints:- Did you forget a comma?- All open brackets ({, (, [) must have a matching closing bracket. Are you sure it's there?- Brackets must be opened and closed in the right order. This will work: ({}), but this won't: ({)}.

svp peut on m'aider.
le job avec le vip c lui :

TEAM_GIGN2 = DarkRP.createJob("GIGN Sniper -VIP-", {
color = Color(47, 11, 191, 255),
model = {"models/MSF/soldier2.mdl"},
description = [[Vous etes un GIGN sniper vous etes plus grader que gign ]],
weapons = {"weapon_fists", "fas2_m24", "fas2_mp5k", "fas2_ots33", "idcard", "weapon_arc_atmcard", "stungun", "weapon_r_handcuffs", "wep_jack_job_drpradio", "weaponchecker"},
command = "gignvip",
max = 7,
salary = 250,
admin = 0,
vote = true,
hasLicense = true,
candemote = false,
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(250)
end,
PlayerDeath = function(ply, weapon, killer)
ply:teamBan()
ply:changeTeam(GAMEMODE.DefaultTeam, true)
DarkRP.notifyAll(0, 4, "Un GIGN est mort")
end
customCheck = function(ply) return ply:GetNWString("usergroup") == "VIP" end
})
 
  • Initiateur de la discussion
Eliott2510

Eliott2510

Geek
Messages
27
Score réaction
3
Points
80
alors svp je peut discord et ts si besoin ?
 
  • Initiateur de la discussion
Eliott2510

Eliott2510

Geek
Messages
27
Score réaction
3
Points
80
svp une idée ??? je galere vraiment
 
LevaDy

LevaDy

Geek suprême
Messages
63
Score réaction
3
Points
105
Tu as mal placé/Codé le code place le comme ca :

customCheck = function(ply) return
table.HasValue({"vip", "superadmin"}, ply:GetNWString("usergroup"))
end,
CustomCheckFailMsg = "Pour les vip seulement !",

EXEMPLE :

TEAM_CITIZEN = DarkRP.createJob("Citizen", {
color = Color(20, 150, 20, 255),
model = {
"models/player/Group01/Female_01.mdl",
"models/player/Group01/Female_02.mdl",
"models/player/Group01/Female_03.mdl",
"models/player/Group01/Female_04.mdl",
"models/player/Group01/Female_06.mdl",
"models/player/group01/male_01.mdl",
"models/player/Group01/Male_02.mdl",
"models/player/Group01/male_03.mdl",
"models/player/Group01/Male_04.mdl",
"models/player/Group01/Male_05.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"
},
description = [[The Citizen is the most basic level of society you can hold besides being a hobo. You have no specific role in city life.]],
weapons = {},
command = "citizen",
max = 0,
salary = GAMEMODE.Config.normalsalary,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Citizens",
customCheck = function(ply) return
table.HasValue({"vip", "superadmin"}, ply:GetNWString("usergroup"))
end,
CustomCheckFailMsg = "Pour les VIP seulement",
})

Voila j'espère t'avoir aidé sinon un site bien utile que je peut te conseiller : https://csite.io/
 
  • Initiateur de la discussion
Eliott2510

Eliott2510

Geek
Messages
27
Score réaction
3
Points
80
LevaDy à dit:
Tu as mal placé/Codé le code place le comme ca :

customCheck = function(ply) return
table.HasValue({"vip", "superadmin"}, ply:GetNWString("usergroup"))
end,
CustomCheckFailMsg = "Pour les vip seulement !",

EXEMPLE :

TEAM_CITIZEN = DarkRP.createJob("Citizen", {
color = Color(20, 150, 20, 255),
model = {
"models/player/Group01/Female_01.mdl",
"models/player/Group01/Female_02.mdl",
"models/player/Group01/Female_03.mdl",
"models/player/Group01/Female_04.mdl",
"models/player/Group01/Female_06.mdl",
"models/player/group01/male_01.mdl",
"models/player/Group01/Male_02.mdl",
"models/player/Group01/male_03.mdl",
"models/player/Group01/Male_04.mdl",
"models/player/Group01/Male_05.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"
},
description = [[The Citizen is the most basic level of society you can hold besides being a hobo. You have no specific role in city life.]],
weapons = {},
command = "citizen",
max = 0,
salary = GAMEMODE.Config.normalsalary,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Citizens",
customCheck = function(ply) return
table.HasValue({"vip", "superadmin"}, ply:GetNWString("usergroup"))
end,
CustomCheckFailMsg = "Pour les VIP seulement",
})

Voila j'espère t'avoir aidé sinon un site bien utile que je peut te conseiller : https://csite.io/
Merci beaucoup pour ta réponse levaDy j’ai un amie qui m’a dit la même chose et c ça, ça a marché
 
LevaDy

LevaDy

Geek suprême
Messages
63
Score réaction
3
Points
105
Content de t'avoir aidé :D
 
S

sparto6000

Sparto50
Messages
4
Score réaction
0
Points
5
j'ai un problem avec le vip

26/02/2022 18:43:05
Lua Error:
[ERROR] gamemodes/darkrp/gamemode/libraries/simplerr.lua:528: [ERROR] A runtime error has occurred in "customCheck" on line 1.
The best help I can give you is this:
Something is being called like it is a function, but in reality it is a userdata.
Hints:
- You are doing something(). The 'something' here is not a function.
The responsibility for the error above lies with (the authors of) one (or more) of these files:
1. customCheck on line 1
2. gamemodes/darkrp/gamemode/libraries/fn.lua on line 84
3. gamemodes/darkrp/gamemode/libraries/fn.lua on line 84
4. gamemodes/darkrp/gamemode/libraries/fn.lua on line 84
5. gamemodes/darkrp/gamemode/libraries/fn.lua on line 84
6. gamemodes/darkrp/gamemode/modules/jobs/sv_jobs.lua on line 46
7. gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua on line 226
8. gamemodes/darkrp/gamemode/modules/chat/sv_chat.lua on line 17
9. gamemodes/darkrp/gamemode/modules/chat/sv_chat.lua on line 325
10. lua/includes/mo
[ERROR] gamemodes/darkrp/gamemode/libraries/simplerr.lua:528: [ERROR] A runtime error has occurred in "customCheck" on line 1.
The best help I can give you is this:
Something is being called like it is a function, but in reality it is a userdata.
Hints:
- You are doing something(). The 'something' here is not a function.
The responsibility for the error above lies with (the authors of) one (or more) of these files:
1. customCheck on line 1
2. gamemodes/darkrp/gamemode/libraries/fn.lua on line 84
3. gamemodes/darkrp/gamemode/libraries/fn.lua on line 84
4. gamemodes/darkrp/gamemode/libraries/fn.lua on line 84
5. gamemodes/darkrp/gamemode/libraries/fn.lua on line 84
6. gamemodes/darkrp/gamemode/modules/jobs/sv_jobs.lua on line 46
7. gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua on line 226
8. gamemodes/darkrp/gamemode/modules/chat/sv_chat.lua on line 17
9. gamemodes/darkrp/gamemode/modules/chat/sv_chat.lua on line 325
10. lua/includes/modules/concommand.lua on line 54

comment je peux le régler
 
Discord d'entraide
Rejoignz-nous sur Discord