mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-04 00:23:27 +08:00
feat(Fuctions): Added delete_entity func
This commit is contained in:
parent
7ca234bdb5
commit
b061a41809
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user