Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. player = entity_get("player")
  2.  
  3. int lua_entity_get(lua_State *L) {
  4.  
  5. string _arg = lua_tostring(L, -1); // "player" in this example
  6.  
  7. Entity *_entity = entityManager->GetEntity(_arg);
  8.  
  9. CreateEntityTable(_entity); // Push the table with fields from _entity for the return value
  10.  
  11. return 1; // One return value - the table created above
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement