Solved Help bind update to hook

Status
Not open for further replies.

zxcDelix

Platinian
Original poster
Feb 12, 2023
41
5
8
24
Ukraine
I need to send a number in string format from a slider that has a data type Int, I made the following code, but the stickers are not sent, most likely I need to link the update to this sending, but I don’t quite understand how to do this, I will be glad for any help.

C++:
monoString* (*old_SendSticker)(void *instance);
monoString* SendSticker(void *instance) {
    if (instance != NULL) {
        if (sendmoji) {
            std::string emojiString = std::to_string(emoji);
            return CreateMonoStringType(emojiString.c_str());
        }
    }
    old_SendSticker(instance);
}
// RVA: 0x590244 Offset: 0x590244 VA: 0x590244
private void LateUpdate() {}

// RVA: 0x5911BC Offset: 0x5911BC VA: 0x5911BC
public void OnSticker(string stickerName) { }
 

awdasd

Platinian
Feb 14, 2021
8
1
3
17
United Kingdom
I think you forgot to return the old function lol.

Also if emoji is already of type const char*, then you can you put it directly as an argument to CreateMonoStringType.
 

libModz

Awesome Active Platinian
Jun 2, 2022
163
29
28
UK
If this is for Hide Online, just so you know other players won't be able to see the stickers this way.
For that you need to use PUN RPC which is complicated.
 

zxcDelix

Platinian
Original poster
Feb 12, 2023
41
5
8
24
Ukraine
If this is for Hide Online, just so you know other players won't be able to see the stickers this way.
For that you need to use PUN RPC which is complicated.
Thank you, I understand, I’m still a long way from RPC, I’ll put this aside for now.
 

DaRealPanDa

Co-Administrator
Staff member
Supporting-Team
Global Moderator
Social Media
Mar 12, 2018
6,771
15,627
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.
 
Status
Not open for further replies.