VIP Jobs aren't working and are open to public

TEAM_SECRETSERVICE = AddExtraTeam(“Secret Service”, Color(37, 51, 178, 255), “models/player/suits/male_07.mdl”, [[ As Secret Service,
Your duty will be to protect the mayor at all costs. You will put your life to save
the mayor’s.
VIP ONLY ]], {“weapon_mad_mp5”, “arrest_stick”, “unarrest_stick”, “weapon_mad_57”, “stunstick”, “door_ram”, “weaponchecker”, “weapon_mad_flash”}, “secretservice”, 3, 125, 0, false, false, {TEAM_POLICE}, function(ply) return ply:GetUserGroup() == “vip” or ply:IsAdmin() end);

Why won’t this work? Basically I get no errors, admins can join, but EVERYONE has access to the job, not just admins / VIP, anyone know why? I am using ULX.



TEAM_SECRETSERVICE = AddExtraTeam("Secret Service", Color(37, 51, 178, 255), "models/player/suits/male_07.mdl", [[ As Secret Service,
Your duty will be to protect the mayor at all costs. You will put your life to save
the mayor's.
**VIP ONLY** ]], {"weapon_mad_mp5", "arrest_stick", "unarrest_stick", "weapon_mad_57", "stunstick", "door_ram", "weaponchecker", "weapon_mad_flash"}, "secretservice", 3, 125, 0, false, false,  {TEAM_POLICE}, function(ply) return ply:GetUserGroup() == "vip" or ply:IsAdmin() end)


Edit;
Sorry my Copypaste didn’t work, Didn’t mean to mess things up, I just fixed it! Sorry! :stuck_out_tongue:

did not work.

Anyone know why?

The one you posted should be fine, try changing ply:GetUserGroup() == “vip” to ply:CheckGroup(“vip”)

Between all the (true, true) or (false, false) or (true,false) or (false, true) and the usergroup check add " nil,". You need to put a nil field in front of your ply:GetUserGroup() == “vip”.

[editline]14th August 2012[/editline]

Oh, no, stupid me. Are you sure that TEAM_POLICE exists? Post your whole shared.lua.

[editline]14th August 2012[/editline]

Again, not at my best atm.


, function(ply) return ply:GetUserGroup("usergroup") == "vip" or ply:GetUserGroup("usergroup") == "vipadmin" or ply:GetUserGroup("usergroup") == "trusted_admin" or ply:IsSuperAdmin() end)

That is what I use.
You have to use ply:GetUserGroup(“usergroup”) == “<usergroup you want>”