ply:SteamID() not working properly?

This is my code:

ply:ChatPrint(string.gsub(ply:SteamID(), “:”, “_”, 2))


Could anybody tell me why it’s returning that and maybe how to fix it? Thanks.

PS. I’m passing ply through a hook if it matters?

[editline]22nd February 2012[/editline]

Nvm, just read the wiki page:

-When this function is serverside and on a single player game this function returns STEAM_0:0:0.

If you play a SinglePlayer game the SteamID return nothing(0), because the steamid dosent exists in the singleplayer game.

Ps: thx for the Dumb ratings from the users they didnt answer.

not true, it will return STEAM_0:0:0.