feat(Fuctions): Added delete_entity func

This commit is contained in:
Yimura 2021-01-17 00:44:00 +01:00
parent 7ca234bdb5
commit b061a41809
2 changed files with 12 additions and 0 deletions

View File

@ -119,6 +119,16 @@ namespace big::features::functions
g_settings.save();
}
void delete_entity(Entity ent)
{
take_control_of_entity(ent);
ENTITY::DETACH_ENTITY(ent, 1, 1);
ENTITY::SET_ENTITY_COORDS_NO_OFFSET(ent, 0, 0, 0, 0, 0, 0);
ENTITY::SET_ENTITY_AS_MISSION_ENTITY(ent, 0, 1);
ENTITY::DELETE_ENTITY(&ent);
}
bool take_control_of_entity(Entity ent)
{
if (NETWORK::NETWORK_HAS_CONTROL_OF_ENTITY(ent)) return true;

View File

@ -13,6 +13,8 @@ namespace big::features::functions
void spoof_rank(int rank);
void toggle_protections(bool toggle);
void delete_entity(Entity ent);
Entity spawn_vehicle(const char* model, Vector3 location, float heading);
void create_ambient_money(Vector3 location, int amount);