Bug on groups

[ES]Hola a todos, gracias de antemano por mirar e intentar arreglar este problema. Verán tengo un problema con ciertos grupos de mi servidor, he planteado una iniciativa y requieren grupos, creo uno de los grupos llamado “terranova” y en jobs.lua coloco el siguiente código.

[EN]Hi all, thank you in advance for looking at and trying to fix this problem. You will see I have a problem with certain groups of my server, I have raised an initiative, and require groups, I think one of the groups called “terranova” and I put the following code in jobs.lua.


TEAM_TERRANOVA = DarkRP.createJob("Los Terranova", {
   color = Color(41, 107, 43, 255),
   model = {"models/humans/mafia/male_02.mdl",
   "models/humans/mafia/male_03.mdl",
   "models/humans/mafia/male_04.mdl",
   "models/humans/mafia/male_05.mdl",
   "models/humans/mafia/male_06.mdl",
   "models/humans/mafia/male_07.mdl",
   "models/humans/mafia/male_08.mdl",
   "models/humans/mafia/male_09.mdl"},
   description = [[Familia creada por Stremo,Shiron,ChichoGamer y Rech Blue]],
   weapons = {"weapon_arc_atmcard","fas2_glock20","fas2_ak47","fas2_m3s90","fas2_att_suppressor","fas2_att_compm4","fas2_ifak","fas2_att_tritiumsights"},
   command = "terranova",
   max = 4,
   salary = 0,
   admin = 0,
   lvl = 0,
   vote = false,
   hasLicense = false,
   candemote = false,
   -- CustomCheck
   medic = false,
   chief = false,
   mayor = false,
   hobo = false,
   cook = false,
   category = "Familias",
   customCheck = function(ply) return ply:GetNWString("usergroup") == "terranova" == "vip" or ply:IsAdmin() end, -- The extra check function. Enter nil or nothing to not have a restriction
    CustomCheckFailMsg = "Para poder unirte a terranova entra en el apartado de familias!." -- Allows you to tell the user what went wrong when attempting to switch jobs

[ES]como ven en el apartado aparece correcto.
[EN]as you can see in the section it appears correct.


customCheck = function(ply) return ply:GetNWString("usergroup") == "terranova" == "vip" or ply:IsAdmin() end, -- The extra check function. Enter nil or nothing to not have a restriction
    CustomCheckFailMsg = "Para poder unirte a terranova entra en el apartado de familias!." -- Allows you to tell the user what went wrong when attempting to switch jobs

[ES]dentro del servidor únicamente asigno el rango terranova y les aparece como trabajo no disponible, junto a esto me ocurre con rango policia y rango geo.

[EN]within the server I only assign the Newfoundland range and it appears as not available, along with this case I range police and geo range.

I’m gonna assume your english translations are wrong, because a lot of what you’re saying is not making sense. Can you repeat what your problem is?

I am using a translator, you will see I have created something as the families of Pop Life (arma 3) in garry’s mod, so I need to create a group by family, I started with the first family called terranova, but for some reason within the server put it to a user, tells him that he does not have access to work.



 ply:GetNWString("usergroup") == "terranova" == "vip" 


This won’t work.

If it seems that I can not put two simultaneous ranges for a job? [is the solved]

No, you can. Hoffa was just saying that your code contains improper syntax. Use the or logical operator and another expression.



local group = ply:GetUserGroup()

if group == "terranova" or group == "vip" then


If you need to do more than that, use a table with keys that are your usergroups and values that are all non-nil (true would be ideal).