2022-03-02 08:48:53 -05:00
# include "backend/looped/looped.hpp"
2022-12-22 21:23:32 +00:00
# include "fiber_pool.hpp"
2022-03-02 08:48:53 -05:00
# include "natives.hpp"
2022-12-22 21:23:32 +00:00
# include "backend/looped_command.hpp"
2022-03-02 08:48:53 -05:00
namespace big
{
2022-12-22 21:23:32 +00:00
class invisibility : looped_command
2022-03-02 08:48:53 -05:00
{
2022-12-22 21:23:32 +00:00
using looped_command : : looped_command ;
2022-03-02 08:48:53 -05:00
2022-12-22 21:23:32 +00:00
virtual void on_tick ( ) override
2022-03-02 08:48:53 -05:00
{
2022-12-22 21:23:32 +00:00
ENTITY : : SET_ENTITY_VISIBLE ( self : : ped , false , 0 ) ;
if ( g . self . local_visibility )
NETWORK : : SET_ENTITY_LOCALLY_VISIBLE ( self : : ped ) ;
2022-03-02 08:48:53 -05:00
}
2022-05-02 15:15:49 -04:00
2022-12-22 21:23:32 +00:00
virtual void on_disable ( ) override
2022-05-02 15:15:49 -04:00
{
2022-12-22 21:23:32 +00:00
ENTITY : : SET_ENTITY_VISIBLE ( self : : ped , true , 0 ) ;
2022-05-02 15:15:49 -04:00
}
2022-12-22 21:23:32 +00:00
} ;
invisibility g_invisibility ( " invis " , " Invisiblity " , " Makes you invisible " , g . self . invisibility ) ;
bool_command g_local_visibility ( " localvis " , " Visible Locally " , " Makes you visible to yourself, other players will still not be able to see you " , g . self . local_visibility ) ;
2022-05-02 15:15:49 -04:00
}