refactor(Functions): Moved create ambient money to a function
This commit is contained in:
parent
24a89138d0
commit
3beb21b48b
@ -227,4 +227,12 @@ namespace big::features::functions
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
void create_ambient_money(Vector3 location, int amount)
|
||||
{
|
||||
Hash hash = RAGE_JOAAT("PICKUP_MONEY_PAPER_BAG");
|
||||
|
||||
OBJECT::CREATE_AMBIENT_PICKUP(hash, location.x, location.y, location.z + 0.5f, 0, amount, hash, false, true);
|
||||
STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(hash);
|
||||
}
|
||||
}
|
@ -15,6 +15,8 @@ namespace big::features::functions
|
||||
|
||||
Entity spawn_vehicle(const char* model, Vector3 location, float heading);
|
||||
|
||||
void create_ambient_money(Vector3 location, int amount);
|
||||
|
||||
bool take_control_of_entity(Entity ent);
|
||||
|
||||
BOOL raycast_entity(Entity* ent);
|
||||
|
@ -155,8 +155,7 @@ namespace big
|
||||
{
|
||||
Vector3 coords = ENTITY::GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_selectedPlayer.id), true);
|
||||
|
||||
OBJECT::CREATE_AMBIENT_PICKUP(0x1E9A99F8, coords.x, coords.y, coords.z + 0.5f, 0, rand() % 500 + 2000, (Hash)-1666779307, false, true);
|
||||
STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED((Hash)-1666779307);
|
||||
features::functions::create_ambient_money(coords, rand() % 500 + 2000);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user