Solved How to use Input Value in mod menu

Status
Not open for further replies.

ASDFGHJKLQWE

Solid & Active Platinian
Original poster
Jul 10, 2022
65
19
8
Nepal
Hello guys hope you guys are fine there, let's straight to the topic...
I'm making a mod menu of a game I know the basic how to hook and hexpatches with toggle, switch, checkbox but I don't know how to hook or hexpatches with input value and slider
Can anyone know how to do?
 

sobogamer_2020

Approved Modder
Approved Modder
Apr 6, 2022
384
14,891
1,193
23
Romania
But it's has fixed value and that for level
If you already know the basics of hooking i think you should go deeper in it, because your knowledge about this is not enough to start with InputValue, and to explain a basic thing, the level thing its just an example, you can rename in to Coins, gems, health... or what you want, also the full variable "Level = 0;" or Something like that, its there to declare where to go from, level 0, level 1, level 2, level 3, etc....
 

ASDFGHJKLQWE

Solid & Active Platinian
Original poster
Jul 10, 2022
65
19
8
Nepal
If you already know the basics of hooking i think you should go deeper in it, because your knowledge about this is not enough to start with InputValue, and to explain a basic thing, the level thing its just an example, you can rename in to Coins, gems, health... or what you want, also the full variable "Level = 0;" or Something like that, its there to declare where to go from, level 0, level 1, level 2, level 3, etc....
Yes you are right but I need to do in gems like when I will spend my gems i it in 0 or negative value and when i need to earn i will make 999, 999 or 10 100 or any value which I need
 

sobogamer_2020

Approved Modder
Approved Modder
Apr 6, 2022
384
14,891
1,193
23
Romania
Yes you are right but I need to do in gems like when I will spend my gems i it in 0 or negative value and when i need to earn i will make 999, 999 or 10 100 or any value which I need
I dont understand, when you use it the gems are going negative? Like with minus at the start of the number?
 

ASDFGHJKLQWE

Solid & Active Platinian
Original poster
Jul 10, 2022
65
19
8
Nepal
I dont understand, when you use it the gems are going negative? Like with minus at the start of the number?
Means not all in negative like example in a shooting game we battle and win .... get rewarded by gems or coins so I need to make that the rewards in "inputvalue"
 

ASDFGHJKLQWE

Solid & Active Platinian
Original poster
Jul 10, 2022
65
19
8
Nepal
Offset:0x987754
Public int get_gems

Hook
int Gems = 0;
int (*old_Gems) (void *instance);
int get_gems(void *instance) {
if (instance != NULL) {
if (Gems > 1) {
return Gems;
}
}
return old_Gems(instance);
}

Call hook/ hook thread

HOOK_LIB("libil2cpp.so", "0x987754", get_gems, old_Gems);

Switch
"1_InputValue_1000000_ Input Your Amount"

case 1:
if (value >= 1) {
Gems = value;
}
break;
 

DaRealPanDa

Co-Administrator
Staff member
Supporting-Team
Global Moderator
Social Media
Mar 12, 2018
6,893
15,733
2,120
27
Skyrim
Thread will be set to "solved" and closed.
When you're not happy with that just send me a message and i will re-open the thread for you.

Thanks.
 
  • Like
Reactions: ASDFGHJKLQWE
Status
Not open for further replies.