Advertisement
Guest User

Untitled

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