Multiple steam ID to one custom class... Help please


TEAM_MIKU = DarkRP.createJob("Miku", {
   	color = Color(0, 0, 0, 255),
   	model = {"models/captainbigbutt/vocaloid/miku_classic.mdl"},
   	description = [[123]],
   	weapons = {"m9k_pkm" , "m9k_vector" , "m9k_svu" , "m9k_dbarrel" , "pro_lockpick_update" , "lockpick" , "keypad_cracker"},
   	command = "miku",
   	max = 3,
   	salary = 15000,
   	admin = 0,
   	vote = false,
   	hasLicense = false,
   	candemote = false,
   	customCheck = function(ply)
	return ply:SteamID() == "STEAM_0:0:26450699" , "STEAM_0:0:68362592" , "STEAM_0:0:44983119" end


So this is the code I’m using, am I doing this right because when I restart it just doesn’t work.

I’m trying to make this


return ply:SteamID() == "STEAM_0:0:26450699" , "STEAM_0:0:68362592" , "STEAM_0:0:44983119" end

So 3 of my friends can use a special class

You could make a table with the steamID’s in, and then use table.HasValue( yourTable, ply:SteamID() )

Im like really new to this so idk what that is…



local a = {
	["steamid"] = true,
	["steamid"] = true
}

customCheck = function(ply) return a[ply:SteamID()] end


Can’t you just use ‘or’?



return
( ply:SteamID() == "STEAM_0:0:26450699" ) or ( ply:SteamID() == "STEAM_0:0:68362592" ) or ( ply:SteamID() == "STEAM_0:0:44983119" )
end


(To avoid creating a table just to do a key check)

That’s really annoying.

True, but reasonable for a small amount of players (1-3)

Also easier to read in that context.