YimMenuV2
YimMenuV2 copied to clipboard
[Request]: <Request adding the function to attach cages to passersby. I think that would be fun. Thanks.>
Problem
Could you add a cage attachment for players? I think that would be really fun. Thanks!
Solution
Could you add a cage attachment for players? I think that would be really fun. Thanks!
Reason
I think that would be fun.
Additional context
No response
Duplicate
- [x] I confirm that issue isn't a duplicate.
!!!READ THIS!!! Recovery features
- [x] I confirm that I'm not requesting a recovery feature
Please don't. This is toxic BS.
auto& players = Players::GetPlayers();
static Hash cageHash = Joaat("prop_feeder1_cr");
for (auto& [index, player] : players)
{
if (player.GetId() == PLAYER::PLAYER_ID())
continue;
auto playerPedID = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(player.GetId());
if (!ENTITY::DOES_ENTITY_EXIST(playerPedID))
continue;
Vector3 pos = ENTITY::GET_ENTITY_COORDS(playerPedID, true);
rage::fvector3 coords = {pos.x, pos.y, pos.z - 0.5f};
rage::fvector3 coords_2 = {pos.x, pos.y, pos.z + 1.0f};
Object::Create(cageHash, coords);
Object::Create(cageHash, coords_2);
}
Set iron cages for all players