CheckPassword not working?

Hey all,

I have been messing around with the CheckPassword hook and I’m unable to get it to work properly.

I’ve tried the example on this page:

It will let me in regardless of the SteamID.

Post your code.

I can only assume you’re trying to compare a 64bit SteamID with your usual SteamID. If that’s the case you can simply convert it with util.SteamIDFrom64()


hook.Add(“CheckPassword”, “UserCheck”, function(SteamID64, IP, ServerPass, UserPass, PlayerName)
return util.SteamIDFrom64( SteamID64 ) == “SomeSteamID”


The code is on the page I linked.

Do what scottd564 said and never use that wiki again.

It will still let me in regardless of the SteamID. I left it as “SomeSteamID” and it still lets me straight in.

You are probably trying to use it on listen server, right? I believe it is not working on yourself or bots.
I have tried scottd564’s example and I got kicked with “Bad password.” reason.

I’m using it on a local srcds server and I’ve placed it in autorun/server in its own lua script. I have added prints so the script definitely loads correctly.

Just tried it on a live server and it doesn’t work. Surely I’m not the only one?