This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Ok, i got hooking sorted - this works:
static void (*Gui_displayClientMessage_real)(std::string const&);<br><br>static void Gui_displayClientMessage_hook(std::string const& msg){<br><br> Gui_displayClientMessage_real(msg);<br><br>}
but for some reason if i try to create a new string and pass it through the game crashes... for some reason the variable msg (the one that works - and doesnt change anything) is a std::simple_string . i even tried creating a new string like this:
std::simple_string x = "Test";
std::simple_string x = msg;
Any ideas? - Thanks
Turns out it's a string but I can't change it.. I also am not sure because I can't do functions like replace on it..
Ok thanks, I appreciate it
jni/main.cpp: In function 'void Gui_displayClientMessage_hook(const string&)':
jni/main.cpp:46:33: error: expected primary-expression before 'void'
Gui_displayClientMessage_real(void*, "TEST");
Should i change the
[/p] [pre]static void (*Gui_displayClientMessage_real)(std::string const&);[/pre] [p]
to
[/p] [pre]static void (*Gui_displayClientMessage_real)(Gui*, std::string const&);[/pre] [p]
Omg i love you it worked xD
btw i did this:
[/p] [pre]static void (*Gui_displayClientMessage_real)(Gui*, std::string const&); static void Gui_displayClientMessage_hook(Gui* gui, std::string const& msg){ Gui_displayClientMessage_real(gui, "Hi"); }[/pre] [p]
yes, but can you show me how to do this for example when a level is loaded?
Try this
http://www.mediafire.com/download/j6bcb85yxwfa4gr/MessageAddon.zip
ty
Ok, i got hooking sorted - this works:
but for some reason if i try to create a new string and pass it through the game crashes... for some reason the variable msg (the one that works - and doesnt change anything) is a std::simple_string . i even tried creating a new string like this:
Why doesnt this work?I also tried this:
Any ideas? - Thanks
Turns out it's a string but I can't change it.. I also am not sure because I can't do functions like replace on it..
Ok thanks, I appreciate it
jni/main.cpp: In function 'void Gui_displayClientMessage_hook(const string&)':
jni/main.cpp:46:33: error: expected primary-expression before 'void'
Gui_displayClientMessage_real(void*, "TEST");
Should i change the
to
Omg i love you it worked xD
btw i did this:
yes, but can you show me how to do this for example when a level is loaded?
Try this
http://www.mediafire.com/download/j6bcb85yxwfa4gr/MessageAddon.zip
ty