Ir para conteúdo
  • 0

alisonx23

Pergunta

luascript.cpp



getPlayerSecureMode(cid):

PHP:
int32_t LuaScriptInterface
::
luaGetPlayerSecureMode
(
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 LuaScriptInterface
::
luaGetPlayerFightMode
(
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+

Editado por alisonx23
Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

×
×
  • Criar Novo...