Solved Help

Status
Not open for further replies.

Master TK

Platinian
why doesn't the value go back to original when the slide is at 0?

float Jump = 4.5;

float (*old_jump)(void *instance);
float jump(void *instance) {
if (instance != NULL && Jump) {
return (float) Jump;
}
return Jump(instance);

}

HOOK("0x46D7DC", jump, old_jump);

OBFUSCATE("12_CollapseAdd_SeekBar_JUMP_0_25"),

case 12:
Jump = (float) value;
break;
 
You are returning the return value from a "Jump" function which does not even exist. I don't know how the compiler even allows that. The original value is retrieved by the old_jump function
Jump = 4.5;...but ok, please help me... how do I make when the slide bar (seekbar) is at 0 be modified to a specific value? example sildebar(seekbar) 0 = value is 4.5f.. PLEASE HELP ME
 
Jump = 4.5;...but ok, please help me... how do I make when the slide bar (seekbar) is at 0 be modified to a specific value? example sildebar(seekbar) 0 = value is 4.5f.. PLEASE HELP ME
That's what i am telling you. Jump is not a function. You cannot invoke it with (), it's a float variable. You should learn the basics of programming first before trying to hook. Otherwise you will keep copy pasting people's codes instead of creating your own
 
Jump = 4.5;...but ok, please help me... how do I make when the slide bar (seekbar) is at 0 be modified to a specific value? example sildebar(seekbar) 0 = value is 4.5f.. PLEASE HELP ME

Your value is returning from "Jump" as the modder already explained to you and you set the Jump to 4.5f, so if you want to return it to original, just do
float Jump;
 
I've tried this but it doesn't return to the initial value, the value goes to 0...

Here is the code you want
C++:
float Jump = 0;
float (*old_jump)(void* instance);
float jump(void* instance){
 if(instance != NULL && Jump > 0){
     return Jump;
  }
  return 4.5;
}

Again, you should learn cpp and programming in general otherwise you won't be able to truly ever create your own mods. Ciao :)
 
Status
Not open for further replies.
Back
Top Bottom