Lua Steam Id's

Hi, I have little knowledge about lua scripting, and there is one command that I need help on. I don’t know if this is an existing command but it seems like it is. So, say I want only a certain person to have specific weapons by their steam id. So I would enter a command similar to this:

if steamid == STEAM01:11:11111 then
pl:Give( “weapon_blah” )
end

Anybody who could tell me that there is or isn’t an existing command similar to that, please tell me.

Thank You.


(User was banned for this post ("Wrong section" - mahalis))

[lua]
function giveWeapon(player, command, args)
if player:SteamID() == “STEAM_0:1:1111111” then
player:Give(“weapon_blah”)
end
end
concommand.Add(“getweapon”, giveWeapon)
[/lua]
or if you wanted multiple SteamIDs:

[lua]
local allowedSteamIDs = {“STEAM_1”, “STEAM_2”, “STEAM_3”}
function giveWeapon(player, command, args)
if table.HasValue(allowedSteamIDs, player:SteamID()) then
player:Give(“weapon_blah”)
end
end
concommand.Add(“getweapon”, giveWeapon)
[/lua]

WOW! You replied fast! That was very helpful and just what I needed too. Thank you!

Code me a gamemode.

No.