- Initiateur de la discussion
_boul12_4
Têtard
- Messages
- 4
- Score réaction
- 0
- Points
- 0
alors j'ai ajouter un job et une catégorie et depuis ça me met des erreurs lua :
[ERROR] A runtime error has occurred in "addons/darkrpmodification/lua/darkrp_customthings/jobs.lua" on line 18.
The best help I can give you is this:
Corrupt team: Civil!
The admin value must be a number and it must be greater than or equal to zero and smaller than three.
Hints:
- No hints, sorry.
The responsibility for the error above lies with (the authors of) one (or more) of these files:
1. addons/darkrpmodification/lua/darkrp_customthings/jobs.lua on line 18
2. function 'xpcall'
3. gamemodes/darkrp/gamemode/libraries/simplerr.lua on line 477
4. gamemodes/darkrp/gamemode/libraries/fn.lua on line 84
5. gamemodes/darkrp/gamemode/libraries/fn.lua on line 84
6. gamemodes/darkrp/gamemode/libraries/modificationloader.lua on line 138
7. gamemodes/darkrp/gamemode/libraries/modificationloader.lua on line 149
8. gamemodes/darkrp/gamemode/init.lua on line 111
------- End of Simplerr error -------
alors voici mon job.lua et mon catégorie.lua :
un peu d'aide serait la bienvenue, merci d'avance !
[ERROR] A runtime error has occurred in "addons/darkrpmodification/lua/darkrp_customthings/jobs.lua" on line 18.
The best help I can give you is this:
Corrupt team: Civil!
The admin value must be a number and it must be greater than or equal to zero and smaller than three.
Hints:
- No hints, sorry.
The responsibility for the error above lies with (the authors of) one (or more) of these files:
1. addons/darkrpmodification/lua/darkrp_customthings/jobs.lua on line 18
2. function 'xpcall'
3. gamemodes/darkrp/gamemode/libraries/simplerr.lua on line 477
4. gamemodes/darkrp/gamemode/libraries/fn.lua on line 84
5. gamemodes/darkrp/gamemode/libraries/fn.lua on line 84
6. gamemodes/darkrp/gamemode/libraries/modificationloader.lua on line 138
7. gamemodes/darkrp/gamemode/libraries/modificationloader.lua on line 149
8. gamemodes/darkrp/gamemode/init.lua on line 111
------- End of Simplerr error -------
alors voici mon job.lua et mon catégorie.lua :
--[[-----------------------------------------------------------------------
Categories
---------------------------------------------------------------------------
The categories of the default F4 menu.
Please read this page for more information:
In case that page can't be reached, here's an example with explanation:
DarkRP.createCategory{
name = "Citizens", -- The name of the category.
categorises = "jobs", -- What it categorises. MUST be one of "jobs", "entities", "shipments", "weapons", "vehicles", "ammo".
startExpanded = true, -- Whether the category is expanded when you open the F4 menu.
color = Color(0, 107, 0, 255), -- The color of the category header.
canSee = function(ply) return true end, -- OPTIONAL: whether the player can see this category AND EVERYTHING IN IT.
sortOrder = 100, -- OPTIONAL: With this you can decide where your category is. Low numbers to put it on top, high numbers to put it on the bottom. It's 100 by default.
}
Add new categories under the next line!
---------------------------------------------------------------------------]]
DarkRP.createCategory{
name = "Survivant", -- The name of the category.
categorises = "jobs", -- What it categorises. MUST be one of "jobs", "entities", "shipments", "weapons", "vehicles", "ammo".
startExpanded = true, -- Whether the category is expanded when you open the F4 menu.
color = Color(0, 107, 0, 255), -- The color of the category header.
canSee = function(ply) return true end, -- OPTIONAL: whether the player can see this category AND EVERYTHING IN IT.
sortOrder = 100, -- OPTIONAL: With this you can decide where your category is. Low numbers to put it on top, high numbers to put it on the bottom. It's 100 by default.
}
Categories
---------------------------------------------------------------------------
The categories of the default F4 menu.
Please read this page for more information:
DarkRP:Categories - Official DarkRP Wiki
wiki.darkrp.com
In case that page can't be reached, here's an example with explanation:
DarkRP.createCategory{
name = "Citizens", -- The name of the category.
categorises = "jobs", -- What it categorises. MUST be one of "jobs", "entities", "shipments", "weapons", "vehicles", "ammo".
startExpanded = true, -- Whether the category is expanded when you open the F4 menu.
color = Color(0, 107, 0, 255), -- The color of the category header.
canSee = function(ply) return true end, -- OPTIONAL: whether the player can see this category AND EVERYTHING IN IT.
sortOrder = 100, -- OPTIONAL: With this you can decide where your category is. Low numbers to put it on top, high numbers to put it on the bottom. It's 100 by default.
}
Add new categories under the next line!
---------------------------------------------------------------------------]]
DarkRP.createCategory{
name = "Survivant", -- The name of the category.
categorises = "jobs", -- What it categorises. MUST be one of "jobs", "entities", "shipments", "weapons", "vehicles", "ammo".
startExpanded = true, -- Whether the category is expanded when you open the F4 menu.
color = Color(0, 107, 0, 255), -- The color of the category header.
canSee = function(ply) return true end, -- OPTIONAL: whether the player can see this category AND EVERYTHING IN IT.
sortOrder = 100, -- OPTIONAL: With this you can decide where your category is. Low numbers to put it on top, high numbers to put it on the bottom. It's 100 by default.
}
--[[---------------------------------------------------------------------------
DarkRP custom jobs
---------------------------------------------------------------------------
This file contains your custom jobs.
This file should also contain jobs from DarkRP that you edited.
Note: If you want to edit a default DarkRP job, first disable it in darkrp_config/disabled_defaults.lua
Once you've done that, copy and paste the job to this file and edit it.
The default jobs can be found here:
For examples and explanation please visit this wiki page:
Add your custom jobs under the following line:
---------------------------------------------------------------------------]]
TEAM_CIVIL = DarkRP.createJob("Civil", {
color = Color(115, 117, 122, 255),
model = {
"models/tnb/citizens/female_17.mdl",
},
description = [[Vous êtes un survivant qui ne dépend d'aucune faction, vous vivez dans le Metro et essayez de survivre malgré le peu de moyen que vous possèdez.]],
weapons = {"weapon_fists","keys","weapon_physcannon","gmod_tool"},
command = "survivant",
max = 80,
salary = 10,
vote = false,
hasLicense = false,
category = "Survivant",
candemote = false,
PlayerLoadout = function(ply) ply:SetArmor( 0 ) end,
customCheck = function(ply) return CLIENT or
table.HasValue({"user","admin","superadmin"}, ply:GetNWString("usergroup"))
end,
})
--[[---------------------------------------------------------------------------
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)
DarkRP custom jobs
---------------------------------------------------------------------------
This file contains your custom jobs.
This file should also contain jobs from DarkRP that you edited.
Note: If you want to edit a default DarkRP job, first disable it in darkrp_config/disabled_defaults.lua
Once you've done that, copy and paste the job to this file and edit it.
The default jobs can be found here:
DarkRP/jobrelated.lua at master · FPtje/DarkRP
DarkRP, a non-serious roleplay gamemode for Garry's Mod. - DarkRP/jobrelated.lua at master · FPtje/DarkRP
github.com
For examples and explanation please visit this wiki page:
DarkRP:CustomJobFields - Official DarkRP Wiki
wiki.darkrp.com
Add your custom jobs under the following line:
---------------------------------------------------------------------------]]
TEAM_CIVIL = DarkRP.createJob("Civil", {
color = Color(115, 117, 122, 255),
model = {
"models/tnb/citizens/female_17.mdl",
},
description = [[Vous êtes un survivant qui ne dépend d'aucune faction, vous vivez dans le Metro et essayez de survivre malgré le peu de moyen que vous possèdez.]],
weapons = {"weapon_fists","keys","weapon_physcannon","gmod_tool"},
command = "survivant",
max = 80,
salary = 10,
vote = false,
hasLicense = false,
category = "Survivant",
candemote = false,
PlayerLoadout = function(ply) ply:SetArmor( 0 ) end,
customCheck = function(ply) return CLIENT or
table.HasValue({"user","admin","superadmin"}, ply:GetNWString("usergroup"))
end,
})
--[[---------------------------------------------------------------------------
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)
un peu d'aide serait la bienvenue, merci d'avance !