void CashAllLoop()
{
int i = 0;
for (i = 0;i<18;i++)
{
if (i == PLAYER::PLAYER_ID()) continue;
int Handle = PLAYER::GET_PLAYER_PED(i);
if(!ENTITY::DOES_ENTITY_EXIST(Handle)) continue;
int theirPedHandle = PLAYER::GET_PLAYER_PED(i);
int myPedHandle = PLAYER::PLAYER_PED_ID();
char* Pickup = "PICKUP_MONEY_CASE";
char* Model = "prop_rock_1_a"; //object
Vector3 coords = ENTITY::GET_ENTITY_COORDS(theirPedHandle, false);
{
int ModelHash = GAMEPLAY::GET_HASH_KEY(Model);
int PickupHash = GAMEPLAY::GET_HASH_KEY(Pickup);
STREAMING::REQUEST_MODEL(ModelHash);
if (STREAMING::HAS_MODEL_LOADED(ModelHash))
{
OBJECT::CREATE_AMBIENT_PICKUP(PickupHash, coords.x, coords.y, coords.z+1, 0, 40000, ModelHash, 0, 1);
STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(ModelHash);
}
}
}
}
{
int i = 0;
for (i = 0;i<18;i++)
{
if (i == PLAYER::PLAYER_ID()) continue;
int Handle = PLAYER::GET_PLAYER_PED(i);
if(!ENTITY::DOES_ENTITY_EXIST(Handle)) continue;
int theirPedHandle = PLAYER::GET_PLAYER_PED(i);
int myPedHandle = PLAYER::PLAYER_PED_ID();
char* Pickup = "PICKUP_MONEY_CASE";
char* Model = "prop_rock_1_a"; //object
Vector3 coords = ENTITY::GET_ENTITY_COORDS(theirPedHandle, false);
{
int ModelHash = GAMEPLAY::GET_HASH_KEY(Model);
int PickupHash = GAMEPLAY::GET_HASH_KEY(Pickup);
STREAMING::REQUEST_MODEL(ModelHash);
if (STREAMING::HAS_MODEL_LOADED(ModelHash))
{
OBJECT::CREATE_AMBIENT_PICKUP(PickupHash, coords.x, coords.y, coords.z+1, 0, 40000, ModelHash, 0, 1);
STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(ModelHash);
}
}
}
}