I am making my own DarkRP server and was wondering how I would go about creating a VIP class that can circumvent voting for jobs. I created a VIP player group, but I believe I need to create another number for VIPs in the shared.lua ie. Public = 0, admin = 1, superadmin = 2, vip = 3. Of course if these are cumulative rights I would have to change the order.

Any help would be appreciated

I’m am guessing that would take alot of work because admin is pl:IsAdmin is the code that they use for that like pl:IsSuperAdmin is the code for super admin so someone would have to create some like this pl:IsVip which would be hard but i’m not sure…

pmeta = FindMetaTable(“Player”);

function pmeta:IsVIP()
return self:IsUserGroup(“vip”);

Nope. Not that hard.

Oh whoops this code could really help with some of my gamemodes. Thanks

No problem. Though it would still require you to edit the users.txt on your server or do this:

Or you could add them into your ulx groups

So sorry! Where do i find this code to put the vip in?

Use ply:SetUserGroup(“vip”) .

I don’t really know how ULX recognizes their groups. But something like.
[lua]if ply:IsULXGroup(“VIP”) then


init.lua i think. Or atleast a serverside file… I’m not really sure tbh.

[lua]pmeta = FindMetaTable(“Player”);

function pmeta:IsVIP()
return self:IsUserGroup(“vip”)

function CheckVIP( ply )
if ply:IsVIP() then
hook.Add( “PlayerInitialSpawn”, “playerInitialSpawn”, CheckVIP )

This is not my business but if you have a post relating to RP then you should post it in the RP section :slight_smile: Stated in the posting rules:

Making an RP-related thread? Post it in the GMod Roleplaying Forum. This includes RP questions!

Okay, that code doesn’t entirely answer the question. When making a job, 0 means any1 can use it. 1 means only admins and 2 means superadmins. What would you put for VIP?