VIP Jobs for GMod 13?

I want to make VIP only jobs on my server. Is there any code I can use (That has been updated for gmod 13) that will do this? I have googled this but I only found codes for gmod 12.
Thanks.

Not entirely sure what you mean, but I have a rough guess.

Are you talking about ranks? like admin - regulars - guests? Because you can make ranks that showup in the scoreboard using evolve. For example, I have:

Owner
Admin
Moderators
BlueOrifice members
Regulars
guests

all of which can execute rank specific commands, like !time or !votemap etc.

No, Im sorry: When I said VIP, I meant donator jobs

I still don’t understand. If they donate, cant you just change there rank to Donor or w/e?

He’s talking about DarkRP. Apparently it did not need to be said because we are to understand that DarkRP is the only gamemode in GM13.

I’m pretty sure he is running DarkRP :slight_smile:

If that’s the case here is an example:
[lua]

TEAM_CITIZEN = AddExtraTeam(“Citizen”, {
color = Color(20, 150, 20, 255),
model = {
“models/player/Group01/Female_01.mdl”,
“models/player/Group01/Female_02.mdl”,
“models/player/Group01/Female_03.mdl”,
“models/player/Group01/Female_04.mdl”,
“models/player/Group01/Female_06.mdl”,
“models/player/Group01/Female_07.mdl”,
“models/player/group01/male_01.mdl”,
“models/player/Group01/Male_02.mdl”,
“models/player/Group01/male_03.mdl”,
“models/player/Group01/Male_04.mdl”,
“models/player/Group01/Male_05.mdl”,
“models/player/Group01/Male_06.mdl”,
“models/player/Group01/Male_07.mdl”,
“models/player/Group01/Male_08.mdl”,
“models/player/Group01/Male_09.mdl”
},
description = [[The Citizen is the most basic level of society you can hold
besides being a hobo.
You have no specific role in city life.]],
weapons = {},
command = “citizen”,
max = 0,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
customCheck = function(ply)
return ply:IsUserGroup(“donator”)
end
})
[/lua]

Ofcourse! you know, because im psychic and all.

well its already been answered, but I would of said copy an existing job and edit it to your needs.

Yes, I am running darkrp. Thanks guys!

[editline]22nd November 2012[/editline]

Hey guys Im getting these errors:
[ERROR] gamemodes/darkrp/gamemode/shared.lua:245: ‘}’ expected (to close ‘{’ at line 232) near ‘customCheck’

  1. unknown - gamemodes/darkrp/gamemode/shared.lua:0

[ERROR] gamemodes/darkrp/gamemode/addentities.lua:183: ‘}’ expected (to close ‘{’ at line 177) near ‘customCheck’

  1. unknown - gamemodes/darkrp/gamemode/addentities.lua:0

When trying to run these codes with the customcheck. also I am running ULX

My code for Shared.lua: http://pastebin.com/vbhrfkR7
My code for Addentities.lua: http://pastebin.com/bvhwSmqg

[editline]22nd November 2012[/editline]

Help?

‘}’ expected (to close ‘{’ at line 177) near ‘customCheck’
It tells you what is wrong, and even tells you where to fix…

If you still don’t know what to do. You need to end the line above the ‘customCheck’ function with a comma,
Example:
[lua]
TEAM_SCHEIF = AddExtraTeam(“SWAT Team Leader”, {
color = Color(0, 0, 0, 102),
model = “models/player/riot.mdl”,
description = [[You are in charge of the SWAT force. Assist the Civil
Protection in dangerous situations such as raids and riots with better
weapons and tactics.]],
weapons = {“weapon_mp52”, “weapon_deagle2”, “arrest_stick”, “stunstick”},
command = “swatcheif”,
max = 1,
salary = 75,
admin = 0,
vote = true,
hasLicense = true,
NeedToChangeFrom = TEAM_SWAT,
customCheck = function(ply)
return ply:IsUserGroup(“donator”)
end
})
[/lua]

As you can see, I’ve added a comma on line 14 after TEAM_SWAT

Thank you guys so much! It’s people like you who make me regain some lost hope in humanity. Have a happy Thanksgiving!

[editline]22nd November 2012[/editline]

Oh one more thing, It worked (Yay!) but how can I make it so that myself in the owner group can use these classes too.

If your group is called “owner” then it will be
Example:
[lua]
TEAM_SCHEIF = AddExtraTeam(“SWAT Team Leader”, {
color = Color(0, 0, 0, 102),
model = “models/player/riot.mdl”,
description = [[You are in charge of the SWAT force. Assist the Civil
Protection in dangerous situations such as raids and riots with better
weapons and tactics.]],
weapons = {“weapon_mp52”, “weapon_deagle2”, “arrest_stick”, “stunstick”},
command = “swatcheif”,
max = 1,
salary = 75,
admin = 0,
vote = true,
hasLicense = true,
NeedToChangeFrom = TEAM_SWAT,
customCheck = function(ply)
return ply:IsUserGroup(“donator”) or ply:IsUserGroup(“owner”)
end
})
[/lua]

If you want to enable the job for donators and superadmins:
[lua]
TEAM_SCHEIF = AddExtraTeam(“SWAT Team Leader”, {
color = Color(0, 0, 0, 102),
model = “models/player/riot.mdl”,
description = [[You are in charge of the SWAT force. Assist the Civil
Protection in dangerous situations such as raids and riots with better
weapons and tactics.]],
weapons = {“weapon_mp52”, “weapon_deagle2”, “arrest_stick”, “stunstick”},
command = “swatcheif”,
max = 1,
salary = 75,
admin = 0,
vote = true,
hasLicense = true,
NeedToChangeFrom = TEAM_SWAT,
customCheck = function(ply)
return ply:IsUserGroup(“donator”) or ply:IsSuperAdmin()
end
})
[/lua]

Thanks, It worked.

I have a question about this aswell. When you put in or ply:IsSuperAdmin() does that mean every rank above superadmin can use it too? If not how can I make it so admin up can use it?

[lua]return ply:IsAdmin() – Returns true if the player is admin or higher ranked[/lua]

Okay, thank you very much mate. :slight_smile:

Hey one more question if possible, I am trying to make it so “vip”, “goldmember” and SA+ can use certain printers. This is what I got and it won’t work. :stuck_out_tongue:

AddEntity(“Ruby Money Printer”, {

ent = “ruby_money_printer”,

model = “models/props_c17/consolebox01a.mdl”,

price = 5000,

max = 4,

cmd = “/buyrubymoneyprinter”,
customCheck = function(ply)

         return ply:IsUserGroup("vip") or ply:IsUserGroup("goldmember") and ply:IsSuperAdmin()
    end

})

AddEntity(“Gold Money Printer”, {

ent = “gold_money_printer”,

model = “models/props_c17/consolebox01a.mdl”,

price = 15000,

max = 4,

cmd = “/buygoldmoneyprinter”
,
customCheck = function(ply)

         return ply:IsUserGroup("vip") or ply:IsUserGroup("goldmember") and ply:IsSuperAdmin()
    end

})

AddEntity(“Nuclear Money Printer”, {

ent = “nuclear_money_printer”,

model = “models/props_c17/consolebox01a.mdl”,

price = 30000,

max = 6,

cmd = “/buynuclearmoneyprinter”
,
customCheck = function(ply)

         return ply:IsUserGroup("goldmember") or ply:IsSuperAdmin()
    end

})

Can anyone tell me where I am going wrong?

[lua]
– I replaced and with or
return ply:IsUserGroup(“vip”) or ply:IsUserGroup(“goldmember”) or ply:IsSuperAdmin()
[/lua]

In darkrp, is there a way to disable starting with ammo, or take away ammo from players when they spawn? I want weapons to be already loaded on pickup, but no extra ammo. I’m not sure how to do this.