• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Problem with OnPlayerClickTextdraw
#1
Sad 
The OnPlayerClickTextdraw function is no longer called.

I use y_hooks in different includes to call this function. The rest of the functions that use y_hooks work,?less this.



Has anyone been through this and solved it, or do you have any idea what it might be?

A few days ago it worked perfectly.?I tried to disable each include that uses this function, or call them in the general public on gamemode, but the problem is still.
  Reply
#2
What do you return when you hook them?
Using Pawn.CMD?

If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
  Reply
#3
Return false.



Code:
hook OnPlayerClickTextDraw( playerid, Text:clickedid ) {

        //code

    return false; }
  Reply
#4
Don't return false,

Code:
#define Y_HOOKS_CONTINUE_RETURN_1    (1)        // Continue the hook chain, return 1
#define Y_HOOKS_CONTINUE_RETURN_0    (0)        // Continue the hook chain, return 0
#define Y_HOOKS_BREAK_RETURN_0        (~0)    // Break the hook chain, return 0
#define Y_HOOKS_BREAK_RETURN_1        (~1)    // Break the hook chain, return 1

EDIT: Those are already defined, just return them.

ex.: return Y_HOOKS_CONTINUE_RETURN_0;
Using Pawn.CMD?

If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
  Reply
#5
I've used the same method so far and everything worked. In addition, I have disabled all the includes in which I use y_hook.

The problem must be elsewhere.
  Reply
#6
Oh, I've misunderstood that, oop...



I ain't sure, added any new filterscript/inc?
Using Pawn.CMD?

If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
  Reply
#7
You are a genius. I used a filterscript a few days ago and I forgot to remove it. This causes the problem.
  Reply
#8
Well not really a genius...but good luck with the further work! ??
Using Pawn.CMD?

If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
  Reply


Forum Jump: