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...
[QUOTE=thejjokerr;22856727][lua]
pmeta = FindMetaTable("Player");
function pmeta:IsVIP()
return self:IsUserGroup("vip");
end;[/lua]
Nope. Not that hard.[/QUOTE]Oh whoops this code could really help with some of my gamemodes. Thanks
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
ply:SetUserGroup("vip")
end[/lua]
[editline]04:07PM[/editline]
[QUOTE=Jaastin;25082047]So sorry! Where do i find this code to put the vip in?[/QUOTE]
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")
end
function CheckVIP( ply )
if ply:IsVIP() then
ply:SetUserGroup("vip")
end
end
hook.Add( "PlayerInitialSpawn", "playerInitialSpawn", CheckVIP )
[/lua]
This is not my business but if you have a post relating to RP then you should post it in the RP section :) 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?
Sorry, you need to Log In to post a reply to this thread.