Untitled
// luascript.cpp int32_t LuaInterface::luaGetPlayerByName(lua_State* L) { //getPlayerByName(name) ScriptEnviroment* env = getEnv(); if(Player* player = g_game.getPlayerByName(popString(L))) lua_pushnumber(L, env->addThing(player)); else lua_pushnil(L); return 1; } //getPlayerByName(name) lua_register(m_luaState, "getPlayerByName", LuaInterface::luaGetPlayerByName); // luascript.h static int32_t luaGetPlayerByName(lua_State* L);