YimMenuV2 icon indicating copy to clipboard operation
YimMenuV2 copied to clipboard

feat: add custom weapons

Open kurumimeow opened this issue 6 months ago • 7 comments

Added custom weapons (port from Yimmenu):

  • Cage Gun
  • Delete Gun
  • Gravity Gun
  • Steal Vehicle Gun
  • Repair Gun
  • Vehicle Gun
  • Teleport Gun
  • Paint Gun

Added more UI Items:

  • TabBarItem
  • SameLineItem

kurumimeow avatar Jun 07 '25 18:06 kurumimeow

your Code make conflicts with the base fix it

CSY0N avatar Jun 12 '25 22:06 CSY0N

your Code make conflicts with the base fix it

It's resolved.

kurumimeow avatar Jun 15 '25 17:06 kurumimeow

your Code make conflicts with the base fix it

It's resolved.

Merge conflicts again with latest. @maybegreat48 can we add this? I was going to do this myself but seeing a PR for it, no need.

@kurumimeow as for the SameLineItem, i think this might cause issues since each "section" in the menu has a limited height factor, when that is reached, the items dynamically move to the right side of the existing options. You can see an example of this in the current build by going to Self > Weapons and toggling all 3 of these on

Explosive Ammo Weapon Damage Melee Damage

The float inputs and options move themselves. Double check to ensure this doesn't cause issues with how it works currently after your merge

Deadlineem avatar Jun 18 '25 20:06 Deadlineem

Yeah, I don't recommend creating something like SameLineItem

maybegreat48 avatar Jun 18 '25 20:06 maybegreat48

The SameLineItem will not cause any issue, it actually removes the junkies from the code. It is really useful if you want some items in different line but some items in same line in a same group. loots->AddItem(std::make_shared<ImGuiItem>([] { ImGui::SameLine(); })); loots->AddItem(std::make_shared<CommandItem>("cayopericoheistsetprimarytargetvalue"_J, "Set##primarytargetvalue")); As an example for this one, it will count as two items, but if you use SameLineItem it counts as one item.

And the group takes 7 items per column by default (the items_per_row variable is actually items_per_column here). If you want Explosive Ammo, Weapon Damage, Melee Damage in different line you can remove the second parameter or replace with 3. https://github.com/YimMenu/YimMenuV2/blob/51f5d859eb3dc4e53a7f52e26e6b6efe41084c49/src/game/frontend/items/Items.hpp#L141

kurumimeow avatar Jun 18 '25 20:06 kurumimeow

You can just keep the items you want on the same line with an empty group by passing an empty string as the name parameter

maybegreat48 avatar Jun 18 '25 20:06 maybegreat48

Yeah, that can be done too, I'll remove the SameLineItem then.

kurumimeow avatar Jun 18 '25 21:06 kurumimeow

you should fix ur code not works correctly.

CSY0N avatar Jun 22 '25 11:06 CSY0N

@maybegreat48 i have removed the SameLineItem

kurumimeow avatar Jun 22 '25 17:06 kurumimeow

@maybegreat48 i have removed the SameLineItem

### ERROR has been find in CostumWeapon.cpp

this line

  • auto veh = Vehicle::Create(modelHash, spawnLoc, Self::GetPed().GetHeading(), false);

change it to this: auto veh = Vehicle::Create(modelHash, spawnLoc, Self::GetPed().GetHeading());

CSY0N avatar Jun 23 '25 14:06 CSY0N

will this be added or should i fix it? that's get working without problem?

CSY0N avatar Jun 28 '25 15:06 CSY0N

Done

kurumimeow avatar Jul 07 '25 18:07 kurumimeow