make a command work with a specific STEAMID!

hello guys , i need help by making a command.

look at this


ply:IsSuperAdmin()

is there a way to making it so it only works with a specific steamid.
like “ply:STEAMID_36939609360 THEN”

im sorry about my horrible english because i am from sweden.

if ply:SteamID() == “steamid”



concommand.Add("steamidcheck",function( pl )
	if pl:SteamID() == "STEAM_YOURSTEAM" then
		pl:ChatPrint("Your SteamID checked out!")
	else
		pl:ChatPrint("Your SteamID failed D:")
	end
end)

Something like that?

you guys fucking owns! :slight_smile:

Grant = {}
Grant[1] = “Put a steam_ id here”
Grant[2] = “Put a steam_ id here”

function Pony( ply )

for k,v in pairs( Grant ) do
if (ply:SteamID() == v ) then
– magical function here
else
– magical function here
end
end
end

Don’t know if it would work, I hardly thought about it.

**[Table.HasValue

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Table.HasValue)**

I did something like this
[lua]
MySteamIDTable = {

"STEAM_0:1:0000000",
"STEAM_0:1:0000000",
"STEAM_0:1:0000000",

}

function CheckSteamID( steamid )

if( table.HasValue( MySteamIDTable, steamid ) ) then
	return true;
else
	return false;
end

end

– Example function
function CanIDie( ply, cmd, arg )

local succ = CheckSteamID( ply:SteamID() );

if( succ ) then

	ply:Slay()
	
end

end
concommand.Add( “canidie”, CanIDie ) [/lua]

That’s if you want a system that only certain SteamIDs can use, but you can use any of the other code above. Pointless though when you can just do a simple if statement.

[lua]function CheckSteamID(steamid)
return table.HasValue(MySteamIDTable, steamid)
end[/lua]