SHARE
TWEET

Untitled

a guest Feb 19th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top