Trying to get ULX VIP Jobs

Post Reply
CinnamonTr0lls1
New to forums
New to forums
Posts: 1
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Sun Dec 14, 2014 2:52 pm

Trying to get ULX VIP Jobs

Post by CinnamonTr0lls1 »

Hello!

Well, I'm trying to get VIP jobs for ULX up and running, but they don't want to work.

I've had no lua errors, it just says I'm unable to 'snowman' but I'm the right job.

Heres the code

Code: Select all

TEAM_SNOW = DarkRP.createJob("Snowman", {
    color = Color(255, 255, 255),
    model = "models/humans/snow_man_pm_human/snow_man_pm_human.mdl",
    description = [[You are a snowman!
	Spread holiday cheer! Start snowball fights! VIP Only!]],
    weapons = {"snowball_thrower",},
    command = "snowball",
    max = 2,
    salary = 15,
    admin = 0,
    vote = false,
    hasLicense = false,
	customCheck = function(ply) return CLIENT or ply:IsUserGroup("donor") or ply:IsUserGroup("owner") or ply:IsUserGroup("superadmin+") or ply:IsUserGroup("admin+") or ply:IsUserGroup("headofstaff") or ply:IsUserGroup("coowner") or ply:IsUserGroup("moderator+") end,
})
djstrikes3
New to forums
New to forums
Posts: 11
Joined: Tue Oct 29, 2013 10:10 am

Re: Trying to get ULX VIP Jobs

Post by djstrikes3 »

From the DarkRP wiki:
If you wish to use ULX instead of FAdmin, replace:

Code: Select all

ply:GetNWString("usergroup") == "donator"
With:

Code: Select all

ply:GetUserGroup() == "donator"
So you should change

Code: Select all

customCheck = function(ply) return CLIENT or ply:IsUserGroup("donor") or ply:IsUserGroup("owner") or ply:IsUserGroup("superadmin+") or ply:IsUserGroup("admin+") or ply:IsUserGroup("headofstaff") or ply:IsUserGroup("coowner") or ply:IsUserGroup("moderator+") end,
to

Code: Select all

customCheck = function(ply) return ply:GetUserGroup() == "donor" or ply:GetUserGroup() == "owner" or ply:GetUserGroup() == "superadmin+" or ply:GetUserGroup() == "admin+" or ply:GetUserGroup() == "headofstaff" or ply:GetUserGroup() == "coowner" or ply:GetUserGroup() == "moderator+" end,
I personally am using

Code: Select all

ply:GetNWString("usergroup") == "donor"
with ulx still and it is working fine. If you wanted things to be even easier you can setup inheritance in ulx. With your ranks you could make donor inherit from user, moderator+ inherit from donor, admin+ inherit from moderator, superadmin+ inherit from admin+, headofstaff inherit from superadmin+, coowner inherit from headofstaff, and owner inherit from coowner. Then you would accomplish the same thing you were attempting before with the following code:

Code: Select all

customCheck = function(ply) return ply:CheckGroup("donor") end,
Hope this helped and let me know if you need anything else!
Post Reply