 # Help!HOOK FIELDS & SPINNER

#### MasterCodeView

##### Platinian
Original poster
Hello, I'm a beginner, I would like to know if there is a way to use "Hook field" in the spinner option? if it is possible send me examples please

void (*old_player)(void *instance);
void player(void *instance) {
if (instance != NULL) {
if (Level) { Z
*(float *) ((uint32_t) instance + 0x40) = Level;
}

return old_player(instance);
}
HOOK_LIB("libil2cpp.so", "0xA64C08", player, old_player);

switch (value) {
case 0:

break;
case 1:
Level = 999;
break;
case 2:
Level = 9000;
break;
case 3:
Level = 999999999;
break;

Last edited:

#### Raebydett

##### Solid & Active Platinian
Show us what have u done so far

Original poster

#### dani olmo

##### Platinian
C++:
``````void (*old_FunctionExample)(void *instance);
void FunctionExample(void *instance) {
if (instance != NULL) {
if (Level) {
*(float *) ((uint32_t) instance + 0x40) = 1.0f;
} if else {
*(float *) ((uint32_t) instance + 0x40) = 2.0f;
} if else {
*(float *) ((uint32_t) instance + 0x40) = 3.0f;
}
}
return old_FunctionExample(instance);
}``````

#### GHr__><__

##### Approved Modder
Approved Modder
C++:
``````int Level;

void (*old_player)(...);
void player(void *_this) {
if (_this != nullptr) {

if (Level == 1) {
*(float *) ((uint32_t) instance + 0x40) = 999;
} else if (Level == 2) {
*(float *) ((uint32_t) instance + 0x40) = 9000;
} else if (Level == 3) {
*(float *) ((uint32_t) instance + 0x40) = 999999999;
}
}
old_player(_this);
}

HOOK_LIB("libil2cpp.so", "0xA64C08", player, old_player);

switch (value) {
case 0:
Level = value;
break;
}``````

#### MasterCodeView

##### Platinian
Original poster
C++:
``````int Level;

void (*old_player)(...);
void player(void *_this) {
if (_this != nullptr) {

if (Level == 1) {
*(float *) ((uint32_t) instance + 0x40) = 999;
} else if (Level == 2) {
*(float *) ((uint32_t) instance + 0x40) = 9000;
} else if (Level == 3) {
*(float *) ((uint32_t) instance + 0x40) = 999999999;
}
}
old_player(_this);
}

HOOK_LIB("libil2cpp.so", "0xA64C08", player, old_player);

switch (value) {
case 0:
Level = value;
break;
}``````
Tranks