Cmd

Hello

How to send a SteamID in ConCommand?

args = “STEAM_0:0:12345678”

LocalPlayer():ConCommand("test " … args)

print(args[1]) —> “STEAM_0”

Variable is cut to " : "

Use lua tags, and this should be in Newbie Questions.
[lua]Post your code in here[/lua.]
(Remove the last dot)

[lua]
if (ply:SteamID() == “STEAM_X:X:XXXXXXX”) then
ply:RunConsoleCommand(“say”, “this is a test”)
end
[/lua]

Thanks Dave Parker


(User was banned for this post ("This isn't even slightly helpful what is wrong with you" - mahalis))

You mean SteamID.

I mean, the variable args is cut to character ‘:’

You’re trolling right?

[editline]02:32PM[/editline]

Use [lua]table.concat( args )[/lua] instead of [lua]args[1][/lua]

To defend myself, I wasn’t trolling, I just didn’t understand what he was asking. I edited in the thanks because he corrected me, as UserID wouldn’t have been a really good example of how to run a console command on a user.

Sorry I couldn’t be more help :confused: