Skip to content

Conversation

Vitroze
Copy link
Contributor

@Vitroze Vitroze commented May 12, 2025

Hello,
I've seen that these functions don't exist on gmod and this could be useful in certain cases, like converting SteamID64 if you have a steamid32, or directly retrieving account ID without having to have the player connected.

I decided to recreate the pull request in order to clean up the unnecessary commits made previously. Old Pull Request : #2246

Function added

util.IsSteamID

Description : Checks whether the steamid entered is in the correct format. It sets true for bot
Args : sSteamID (String)
Return : boolean

Info : Concerning this function, I have a doubt about the number of characters that the SteamID32 can contain (19 Char), if someone can correct me I'm a taker ;)

util.IsSteamID64

Description : Checks whether the steamid64 entered is in the correct format. It sets true for bot
Args : sSteamID64 (String)
Return : boolean

util.SteamIDToAccountID

Description : Converts SteamID32 to AccountID. Returns 0 if it's a bot
Args : sSteamID (String)
Return : Int

util.SteamID64ToAccountID

Description : Converts SteamID64 to AccountID. Returns 0 if it's a bot
Args : sSteamID64 (String)
Return : Int

All these functions are on the Shared side (i.e. Client and Server).
Thanks to those who take the time to read and to those who improve the code.

You can see commits on the net.lua file this is an error I changed branch with a modified net.lua file, normally everything is back to normal

@Vitroze Vitroze changed the title Util - SteamID Valid Util - SteamID May 12, 2025
@robotboy655 robotboy655 added the Addition The pull request adds new functionality. label May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Addition The pull request adds new functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants