I'm adding swat to vip only and it returns with this error
[lua]
[ERROR] gamemodes/darkrp/gamemode/shared.lua:57: '}' expected (to close '{' at line 46) near 'function'
1. unknown - gamemodes/darkrp/gamemode/shared.lua:0
[/lua]
Here is the team
[lua]
TEAM_SWAT = AddExtraTeam("SWAT", {
color = Color(20, 21, 255, 255),
model = "models/player/swat.mdl",
description = [[Help CPs in raids]],
weapons = {"weapon_fas_mp5", "weapon_fas_ots33" },
command = "swat",
max = 2,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
function(ply) return ply:GetUserGroup() == "vip" or ply:IsAdmin() end -- The extra check function. Enter nil or nothing to not have an extra check
})
[/lua]
YOU NEED TO CUSTOM CHECK. this is the 40 time People ask this, OMG. Here you go:
[lua] TEAM_SWAT = AddExtraTeam("SWAT", {
color = Color(20, 21, 255, 255),
model = "models/player/swat.mdl",
description = [[Help CPs in raids]],
weapons = {"weapon_fas_mp5", "weapon_fas_ots33" },
command = "swat",
max = 2,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
customCheck = function(ply)
return ply:IsUserGroup("vip") or ply:IsUserGroup("admin")
end
}) [/lua]
Thank you for helping the 40th person then i guess :)
Sorry, you need to Log In to post a reply to this thread.