Advertisement
CREONIX

INFO ENTITY LUA

Nov 19th, 2016
413
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.67 KB | None | 0 0
  1. concommand.Add( "who_model", function(ply)
  2.  
  3.     local mdl = ply:GetEyeTrace().Entity
  4.  
  5.     local owner = mdl:CPPIGetOwner()
  6.  
  7.  
  8.     chat.AddText("Модель: ",Color( 0, 0, 0 ), mdl:GetModel()) -- Model(Модель)
  9.  
  10.     chat.AddText("Обьект: ",Color( 125, 55, 120 ), mdl:GetClass()) -- Class Entity
  11.  
  12.  
  13.     if mdl:GetMaterial() == "" then else chat.AddText("Материал: ",Color( 67, 67, 255 ),mdl:GetMaterial()) end -- Material(Материал)   
  14.  
  15.     if mdl:GetClass() == "prop_physics" then if IsValid(owner) then chat.AddText("Хозяин: ",Color( 210, 255, 255 ),mdl:CPPIGetOwner():Nick()) end end -- Owner prop(Хозяин пропа) Falco's Prop Protection
  16.  
  17. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement