Script not working

For some reason my script isn’t working :expressionless:
[lua]
local DevSteamIDs = {“STEAM_0:1:18596245”,“STEAM_0:0:16458788”}

local function PlayerIsDev(ply)
for _, v in pairs( DevSteamIDs ) do
if ply:SteamID() == v then
return true
end
end
return false
end

function Loadusergroups( ply )

    if PlayerIsDev(ply) then
            ply:ChatPrint("Welcome " .. ply:Nick .. ", Your Rank is Dev")
			ply:SetJumpPower( 200 )
            ply:Give("weapon_stunstick")
            ply.Dev = true
    end

end

hook.Add( “PlayerInitialSpawn”, “Usergroupload”, Loadusergroups )

function DevCheck( ply )
if ply.Dev then
ply:SetJumpPower( 200 )
ply:Give(“weapon_stunstick”)
end
end

hook.Add( “PlayerSpawn”, “DevCheck”, DevCheck )
[/lua]

Help would be appreciated

…And how is it not working?

edit If you’re trying this in singleplayer, don’t. You can’t get steamIDs in singleplayer.

I know… I’m not trying it in singleplayer…

How about, instead of using ply.Dev try using ply:SetNWBool(“Dev”,true) and use ply:GetNWBool to determine dev status. Sometimes setting player variables via <object>.<var> seems to not work.

[lua]
local meta = FindMetaTable( “Player” )

function meta:IsDev()

if( self:SteamID() == “” or self:SteamID() == “” ) then
return true
end

return false

end
[/lua]

[lua]if( ply:IsDev() ) then
–blahblah
end
[/lua]
or
[lua]if( not ply:IsDev() ) then return end
[/lua]

…or you can do it the shitty way, which really sucks.

[lua]if( ply:SteamID() == “” or ply:SteamID() == “” ) then ply:SetNWBool( “IsDev”, true ) end
[/lua]