Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2476,6 → 2476,12
- //getConfigFile()
- lua_register(m_luaState, "getConfigFile", LuaInterface::luaGetConfigFile);
- +//isPlayerUsingOtclient(cid)
- +lua_register(m_luaState, "isPlayerUsingOtclient", LuaInterface::luaIsPlayerUsingOtclient);
- +
- +//doSendPlayerExtendedOpcode(cid, opcode, buffer)
- +lua_register(m_luaState, "doSendPlayerExtendedOpcode", LuaInterface::luaDoSendPlayerExtendedOpcode);
- +
- //getConfigValue(key)
- lua_register(m_luaState, "getConfigValue", LuaInterface::luaGetConfigValue);
- 9471,6 → 9477,32
- return 1;
- }
- +int32_t LuaInterface::luaIsPlayerUsingOtclient(lua_State* L)
- +{
- + //isPlayerUsingOtclient(cid)
- + ScriptEnviroment* env = getEnv();
- + if(Player* player = env->getPlayerByUID(popNumber(L))) {
- + lua_pushboolean(L, player->isUsingOtclient());
- + }
- + lua_pushboolean(L, false);
- + return 1;
- +}
- +
- +int32_t LuaInterface::luaDoSendPlayerExtendedOpcode(lua_State* L)
- +{
- + //doSendPlayerExtendedOpcode(cid, opcode, buffer)
- + std::string buffer = popString(L);
- + int opcode = popNumber(L);
- +
- + ScriptEnviroment* env = getEnv();
- + if(Player* player = env->getPlayerByUID(popNumber(L))) {
- + player->sendExtendedOpcode(opcode, buffer);
- + lua_pushboolean(L, true);
- + }
- + lua_pushboolean(L, false);
- + return 1;
- +}
- int32_t LuaInterface::luaGetPartyMembers(lua_State* L)
- {
- //getPartyMembers(cid)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement