Résolu J'ai un problème avec le customcheck

  • Initiateur de la discussion
J

ju_ju144

Têtard
Messages
16
Score réaction
0
Points
5
J'ai un problème avec le CustomCheck, il ne marche pas sur un metier que j'ai fais, au redémarage de mon serveur le serveur a des bug, on spawn plus en civile, et on n'a plus d'accès au f4 j'ai vraiment besoin d'aide !

Le code :

TEAM_AMERICAIN4 = DarkRP.createJob("Sergent - Americain", {
color = Color(0, 24, 255, 255),
model = {"models/player/rusty/natguard/male_07.mdl"},
description = [[Vous etes un Sergent de l'armée americaines ! Vous avez beaucoup d'experience et pouvez commander une escouade !]],
weapons = {"weapon_physgun", "gmod_camera", "weapon_fists", "gmod_tool", "keys", "pocket"},
command = "americain4",
max = 2,
salary = 200,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Armée Americaines",
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(150)
end
customCheck = function(ply) return CLIENT or
table.HasValue({"VIP"}, ply:GetNWString("usergroup"))
end,
CustomCheckFailMsg = "Tu n'as pas le VIP !",
})
 
gigi018

gigi018

Geek suprême
Messages
105
Score réaction
7
Points
125
Bonjour,
Possible de donner les erreur console ?

ju_ju144 à dit:
J'ai un problème avec le CustomCheck, il ne marche pas sur un metier que j'ai fais, au redémarage de mon serveur le serveur a des bug, on spawn plus en civile, et on n'a plus d'accès au f4 j'ai vraiment besoin d'aide !

Le code :

TEAM_AMERICAIN4 = DarkRP.createJob("Sergent - Americain", {
color = Color(0, 24, 255, 255),
model = {"models/player/rusty/natguard/male_07.mdl"},
description = [[Vous etes un Sergent de l'armée americaines ! Vous avez beaucoup d'experience et pouvez commander une escouade !]],
weapons = {"weapon_physgun", "gmod_camera", "weapon_fists", "gmod_tool", "keys", "pocket"},
command = "americain4",
max = 2,
salary = 200,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Armée Americaines",
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(150)
end
customCheck = function(ply) return CLIENT or
table.HasValue({"VIP"}, ply:GetNWString("usergroup"))
end,
CustomCheckFailMsg = "Tu n'as pas le VIP !",
})
 
Daykew

Daykew

Geek suprême
Messages
503
Score réaction
32
Points
140
gigi018 à dit:
Bonjour,
Possible de donner les erreur console ?
Il a peut être oublié une virgule un truc dans le genre ?
 
Daykew

Daykew

Geek suprême
Messages
503
Score réaction
32
Points
140
gigi018 à dit:
Bonjour,
Possible de donner les erreur console ?
Au end de playerspawn non ?
 
gigi018

gigi018

Geek suprême
Messages
105
Score réaction
7
Points
125
J'ai trouvé =):

Tu as oublier de mettre une virgule au end du playerspawn.
Je te corrige sa tous de suite.



TEAM_AMERICAIN4 = [URL='https://mtxserv.com/fr/louer-serveur/garry-s-mod']DarkRP[/URL].createJob("Sergent - Americain", {
color = Color(0, 24, 255, 255),
model = {"models/player/rusty/natguard/male_07.mdl"},
description = [[Vous etes un Sergent de l'armée americaines ! Vous avez beaucoup d'experience et pouvez commander une escouade !]],
weapons = {"weapon_physgun", "gmod_camera", "weapon_fists", "gmod_tool", "keys", "pocket"},
command = "americain4",
max = 2,
salary = 200,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Armée Americaines",
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(150)
end, -- Ici c'était la faute
customCheck = function(ply) return CLIENT or
table.HasValue({"VIP"}, ply:GetNWString("usergroup"))
end,
CustomCheckFailMsg = "Tu n'as pas le VIP !",
})
 
gigi018

gigi018

Geek suprême
Messages
105
Score réaction
7
Points
125
  • Initiateur de la discussion
J

ju_ju144

Têtard
Messages
16
Score réaction
0
Points
5
Voilà :


Please check your console for more information!
[ERROR] A runtime error has occurred in "[C]" on line -1.
The best help I can give you is this:

DarkRP was unable to introduce player "[IMPERIAL_CZ]ju_ju144[FR]" to the game. Expect further errors and shit generally being fucked!

Hints:
- This error most likely does not stand on its own, and previous serverside errors have a very good chance of telling you the cause.
- Note that errors from another addon could cause this. Specifically when they're thrown during 'PlayerInitialSpawn'.
- This error can also be caused by some other addon returning a value in 'PlayerInitialSpawn', though that is less likely.
- Errors in your DarkRP configuration (jobs, shipments, etc.) could also cause this. Earlier errors should tell you when this is the case.

The responsibility for the error above lies with (the authors of) one (or more) of these files:
1. function 'Spawn'
2. gamemodes/base/gamemode/player.lua on line 115
------- End of Simplerr error -------
 
Daykew

Daykew

Geek suprême
Messages
503
Score réaction
32
Points
140
gigi018

gigi018

Geek suprême
Messages
105
Score réaction
7
Points
125
Daykew

Daykew

Geek suprême
Messages
503
Score réaction
32
Points
140
Ah, ça fait plaisir d'être utile pour une fois Keepo
 
  • Initiateur de la discussion
J

ju_ju144

Têtard
Messages
16
Score réaction
0
Points
5
AH NON je me suis tromper :



TEAM_RESISTANCE4 = DarkRP.createJob("Chef de Bande", {
color = Color(41, 150, 212, 255),
model = {"models/player/big_boss.mdl"},
description = [[Vous etes le chef de tous les rebelles de Fork ! Ils sont à vos ordre... ]],
weapons = {"doi_atow_knifeus", "doi_atow_m1911a1", "weapon_physgun", "gmod_camera", "weapon_fists", "gmod_tool", "keys", "pocket", "doi_atow_binocularsus", "doi_atow_enfield"},
command = "chef",
max = 1,
salary = 250,
admin = 0,
sortOrder = 1,
vote = false,
hasLicense = false,
candemote = false,
category = "Resistance"
customCheck = function(ply) return CLIENT or
table.HasValue({"VIP"}, ply:GetNWString("usergroup"))
end,
CustomCheckFailMsg = "Tu n'as pas le VIP !",
})

Le Error :


[ERROR] A runtime error has occurred in "[C]" on line -1.
The best help I can give you is this:

DarkRP was unable to introduce player "[IMPERIAL_CZ]ju_ju144[FR]" to the game. Expect further errors and shit generally being fucked!

Hints:
- This error most likely does not stand on its own, and previous serverside errors have a very good chance of telling you the cause.
- Note that errors from another addon could cause this. Specifically when they're thrown during 'PlayerInitialSpawn'.
- This error can also be caused by some other addon returning a value in 'PlayerInitialSpawn', though that is less likely.
- Errors in your DarkRP configuration (jobs, shipments, etc.) could also cause this. Earlier errors should tell you when this is the case.

The responsibility for the error above lies with (the authors of) one (or more) of these files:
1. function 'Spawn'
2. gamemodes/base/gamemode/player.lua on line 115
------- End of Simplerr error -------
 
Daykew

Daykew

Geek suprême
Messages
503
Score réaction
32
Points
140
ju_ju144 à dit:
AH NON je me suis tromper :



TEAM_RESISTANCE4 = DarkRP.createJob("Chef de Bande", {
color = Color(41, 150, 212, 255),
model = {"models/player/big_boss.mdl"},
description = [[Vous etes le chef de tous les rebelles de Fork ! Ils sont à vos ordre... ]],
weapons = {"doi_atow_knifeus", "doi_atow_m1911a1", "weapon_physgun", "gmod_camera", "weapon_fists", "gmod_tool", "keys", "pocket", "doi_atow_binocularsus", "doi_atow_enfield"},
command = "chef",
max = 1,
salary = 250,
admin = 0,
sortOrder = 1,
vote = false,
hasLicense = false,
candemote = false,
category = "Resistance"
customCheck = function(ply) return CLIENT or
table.HasValue({"VIP"}, ply:GetNWString("usergroup"))
end,
CustomCheckFailMsg = "Tu n'as pas le VIP !",
})

Le Error :


[ERROR] A runtime error has occurred in "[C]" on line -1.
The best help I can give you is this:

DarkRP was unable to introduce player "[IMPERIAL_CZ]ju_ju144[FR]" to the game. Expect further errors and shit generally being fucked!

Hints:
- This error most likely does not stand on its own, and previous serverside errors have a very good chance of telling you the cause.
- Note that errors from another addon could cause this. Specifically when they're thrown during 'PlayerInitialSpawn'.
- This error can also be caused by some other addon returning a value in 'PlayerInitialSpawn', though that is less likely.
- Errors in your DarkRP configuration (jobs, shipments, etc.) could also cause this. Earlier errors should tell you when this is the case.

The responsibility for the error above lies with (the authors of) one (or more) of these files:
1. function 'Spawn'
2. gamemodes/base/gamemode/player.lua on line 115
------- End of Simplerr error -------
Oh la, tu as mis le darkRP dans la collection affilié au serveur ?
 
  • Initiateur de la discussion
J

ju_ju144

Têtard
Messages
16
Score réaction
0
Points
5
???
 
Daykew

Daykew

Geek suprême
Messages
503
Score réaction
32
Points
140
ju_ju144 à dit:
AH NON je me suis tromper :



TEAM_RESISTANCE4 = DarkRP.createJob("Chef de Bande", {
color = Color(41, 150, 212, 255),
model = {"models/player/big_boss.mdl"},
description = [[Vous etes le chef de tous les rebelles de Fork ! Ils sont à vos ordre... ]],
weapons = {"doi_atow_knifeus", "doi_atow_m1911a1", "weapon_physgun", "gmod_camera", "weapon_fists", "gmod_tool", "keys", "pocket", "doi_atow_binocularsus", "doi_atow_enfield"},
command = "chef",
max = 1,
salary = 250,
admin = 0,
sortOrder = 1,
vote = false,
hasLicense = false,
candemote = false,
category = "Resistance"
customCheck = function(ply) return CLIENT or
table.HasValue({"VIP"}, ply:GetNWString("usergroup"))
end,
CustomCheckFailMsg = "Tu n'as pas le VIP !",
})

Le Error :


[ERROR] A runtime error has occurred in "[C]" on line -1.
The best help I can give you is this:

DarkRP was unable to introduce player "[IMPERIAL_CZ]ju_ju144[FR]" to the game. Expect further errors and shit generally being fucked!

Hints:
- This error most likely does not stand on its own, and previous serverside errors have a very good chance of telling you the cause.
- Note that errors from another addon could cause this. Specifically when they're thrown during 'PlayerInitialSpawn'.
- This error can also be caused by some other addon returning a value in 'PlayerInitialSpawn', though that is less likely.
- Errors in your DarkRP configuration (jobs, shipments, etc.) could also cause this. Earlier errors should tell you when this is the case.

The responsibility for the error above lies with (the authors of) one (or more) of these files:
1. function 'Spawn'
2. gamemodes/base/gamemode/player.lua on line 115
------- End of Simplerr error -------
Tout en bas de ton jobs.lua as-tu bien choisi la bonne Team de citoyen ?
 
Daykew

Daykew

Geek suprême
Messages
503
Score réaction
32
Points
140
Samuel Galimand à dit:
Oh la, tu as mis le darkRP dans la collection affilié au serveur ?
Si c'est le cas le mode DarkRP ne doit pas être dans la collection liée au serveur
 
  • Initiateur de la discussion
J

ju_ju144

Têtard
Messages
16
Score réaction
0
Points
5
C'est ce qu'il y a en bas


--[[---------------------------------------------------------------------------
Define which team joining players spawn into and what team you change to if demoted
---------------------------------------------------------------------------]]
GAMEMODE.DefaultTeam = TEAM_CIVIL
--[[---------------------------------------------------------------------------
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_POLICE] = true,
[TEAM_CHIEF] = true,
[TEAM_MAYOR] = true,
}
--[[---------------------------------------------------------------------------
Jobs that are hitmen (enables the hitman menu)
---------------------------------------------------------------------------]]
DarkRP.addHitmanTeam(TEAM_MOB)
 
  • Initiateur de la discussion
J

ju_ju144

Têtard
Messages
16
Score réaction
0
Points
5
Mais il ne l'ai pas ? j'ai le mode de jeu DarkRP dans le dossier gamemode et le darkrpmodif. dans les addons
 
Daykew

Daykew

Geek suprême
Messages
503
Score réaction
32
Points
140
ju_ju144 à dit:
Mais il ne l'ai pas ? j'ai le mode de jeu DarkRP dans le dossier gamemode et le darkrpmodif. dans les addons
D'accord, vérifie ce que je t'ai dit avec le job de base tout zn bas du jobs.lua, regarde si t'as bien mis une team existante
 
Daykew

Daykew

Geek suprême
Messages
503
Score réaction
32
Points
140
GAMEMODE.DefaultTeam = TEAM_CIVIL

Team existante?
 
  • Initiateur de la discussion
J

ju_ju144

Têtard
Messages
16
Score réaction
0
Points
5
oui oui
 
Daykew

Daykew

Geek suprême
Messages
503
Score réaction
32
Points
140
T'as pas mis la virgule après category
 
  • Initiateur de la discussion
J

ju_ju144

Têtard
Messages
16
Score réaction
0
Points
5
MAIS JE SUIS UN DEBILE XD
L'ERREUR DE DEBUTTANT
j'ai honte ....
Mais merci quand même XD
 
Daykew

Daykew

Geek suprême
Messages
503
Score réaction
32
Points
140
ju_ju144 à dit:
MAIS JE SUIS UN DEBILE XD
L'ERREUR DE DEBUTTANT
j'ai honte ....
Mais merci quand même XD
C'est pas grave j'ai aussi galéré pour de la merde mdrr, un plaisir de t'avoir aidé
 
Discord d'entraide
Rejoignz-nous sur Discord