[Y_Hooks] Hooking custom public function
#4

Quote:
Originally Posted by nG Inverse
Посмотреть сообщение
The only way I managed to make this work is by using CallRemoteFunction to call the custom function.
Ye'p, I thought the same thing and it works. The problem is : "It will be slower than a normal big function ?"
Meller: The function cannot be hooked since nothing call it. So yeah, it won't work with the first (mine) way.
You need to call it by yourself with a custom function:
PHP код:
PUBLIC:ShowFactionDialog(playeriddialogidbool:error)
{
    if(!
IsPlayerConnected(playerid))
        return 
f_c_LOG(LOG_ERROR"Error in the script. %i is trying to access at \"ShowFactionDialog\" but it's an invalid ID."playerid);
    print(
"ShowFactionDialog - 1.0");
    
CallLocalFunction("a_ShowFactionDialog""iii"playeriddialogiderror);
    return 
Y_HOOKS_CONTINUE_RETURN_1;

PHP код:
hook a_ShowFactionDialog(playeriddialogidbool:error)
{
    print(
"a_ShowFactionDialog - 3.0");
    switch(
dialogid
(Using CallLocalFunction since every other file are included in the main one)
Reply


Messages In This Thread
[Y_Hooks] Hooking custom public function - by Dayrion - 13.07.2017, 03:46
Re: [Y_Hooks] Hooking custom public function - by nG Inverse - 13.07.2017, 13:36
Re: [Y_Hooks] Hooking custom public function - by Meller - 13.07.2017, 14:44
Re: [Y_Hooks] Hooking custom public function - by Dayrion - 13.07.2017, 15:51
Re: [Y_Hooks] Hooking custom public function - by Paulice - 13.07.2017, 16:04
Re: [Y_Hooks] Hooking custom public function - by Dayrion - 14.07.2017, 12:30
Re: [Y_Hooks] Hooking custom public function - by nG Inverse - 14.07.2017, 17:21
Re: [Y_Hooks] Hooking custom public function - by Paulice - 14.07.2017, 17:47
Re: [Y_Hooks] Hooking custom public function - by Dayrion - 14.07.2017, 19:32
Re: [Y_Hooks] Hooking custom public function - by nG Inverse - 15.07.2017, 00:14

Forum Jump:


Users browsing this thread: 2 Guest(s)