Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function PrintSteamID(ply)
- if not IsValid(ply) then return end
- local trace = ply:GetEyeTrace()
- if IsValid(trace.Entity) and trace.Entity:IsPlayer() then
- chat.AddText( Color( 0, 255, 0 ), "The SteamID of this player is ", Color ( 255, 0, 0 ), trace.Entity:SteamID(), Color( 0, 255, 0 ), " and the name is ", Color ( 255, 0, 0 ), trace.Entity:Name())
- else
- chat.AddText( Color( 0, 255, 0 ), "You are not looking at a player!")
- end
- end
- concommand.Add( "traceinfo", function(ply)
- if game.SinglePlayer() then
- chat.AddText( Color( 0, 255, 0 ), "You are in singleplayer join multiplayer to use this!")
- else
- PrintSteamID(ply)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment