First you need a Monostring struct. You can just paste it in the main.cpp
C++:
typedef struct _monoString
{
void *klass;
void *monitor;
int length;
char chars[1];
int getLength()
{
return length;
}
char *getChars()
{
return chars;
}
} monoString;
monoString *CreateMonoString(const char *str)
{
monoString *(*CreateString)(void *instance, const char *str) = (monoString * (*)(void *, const char *)) getRealOffset(0x1B92358); //offset here
return CreateString(NULL, str);
}
You can get the CreateString offset from this function in class System.string:
View attachment 506109
if youre using lgl menu, then the getRealOffset() probably doesnt work, so you can just replace it with getAbsoluteAddress(targetLibName_here,offset_here)
Then you can hook like this:
C++:
monoString *(*old_get_BeyID)(void *instance);
monoString *get_BeyID(void *instance)
{
if (instance != NULL)
{
return CreateMonoString("your text here");
}
return old_get_BeyID(instance);
}