luascript.cpp getPlayerSecureMode(cid):
PHP:
int32_t LuaScriptInterfaceluaGetPlayerSecureMode(lua_State* L)
{
//getPlayerSecureMode(cid)
ScriptEnviroment* env = getEnv();
Player* player = env->getPlayerByUID((uint32_t)popNumber(L));
if(!player)
{
errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND));
lua_pushboolean(L, false);
}
else
lua_pushnumber(L, player->getSecureMode());
return 1;
}
getPlayerFightMode(cid):
PHP:
int32_t LuaScriptInterfaceluaGetPlayerFightMode(lua_State* L)
{
//getPlayerFightMode(cid)
ScriptEnviroment* env = getEnv();
Player* player = env->getPlayerByUID((uint32_t)popNumber(L));
if(!player)
{
errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND));
lua_pushboolean(L, false);
}
else
lua_pushnumber(L, player->getAttackFactor());
return 1;
}
simple and useful.
https://otland.net/threads/getplayersecuremode-cid-getplayerfightmode-cid.128276/
Como adicionar isso na soucer, sei q e em luascript, mais em qual lugar,.... ajuda rep+