13.07.2017, 15:51
Quote:
The only way I managed to make this work is by using CallRemoteFunction to call the custom 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(playerid, dialogid, bool: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", playerid, dialogid, error);
return Y_HOOKS_CONTINUE_RETURN_1;
}
PHP код:
hook a_ShowFactionDialog(playerid, dialogid, bool:error)
{
print("a_ShowFactionDialog - 3.0");
switch(dialogid)