CapsAdmin

Untitled

Mar 28th, 2011
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1. LuaObj(IEntity, entity)
  2. {
  3.     function(__tostring)
  4.         lua_pushfstring(L, "IEntity[%d][%s]", self->GetId(), self->GetClass()->GetName());
  5.     end
  6.  
  7.     function(__len)
  8.         lua_pushnumber(L, self->GetId());
  9.     end
  10.  
  11.     function(GetClass)
  12.         lua_pushstring(L, self->GetClass()->GetName());
  13.     end
  14.  
  15.     function(Remove)
  16.         gEnv->pEntitySystem->RemoveEntity(self->GetId(), true);
  17.     end0
  18.  
  19.     function(SetSize)
  20.         self->SetScale(Vec3(1,1,1) * lua_tonumber(L, 2));
  21.     ends
  22. }
Advertisement
Add Comment
Please, Sign In to add comment