Guest User

Untitled

a guest
Aug 9th, 2015
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function PrintSteamID(ply)
  2.     if not IsValid(ply) then return end
  3.     local trace = ply:GetEyeTrace()
  4.  
  5.     if IsValid(trace.Entity) and trace.Entity:IsPlayer() then
  6.         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())
  7.     else
  8.         chat.AddText( Color( 0, 255, 0 ), "You are not looking at a player!")
  9.     end
  10. end
  11.  
  12. concommand.Add( "traceinfo", function(ply)
  13.     if game.SinglePlayer() then
  14.         chat.AddText( Color( 0, 255, 0 ), "You are in singleplayer join multiplayer to use this!") 
  15.     else
  16.         PrintSteamID(ply)
  17.     end
  18. end)
Advertisement
Add Comment
Please, Sign In to add comment