Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Pawn] Problem with OnPlayerClickTextdraw

 
  • 0 Vote(s) - 0 Average
Pawn Problem with OnPlayerClickTextdraw
shane adevaratu
Offline

Burgershot Member
Posts: 9
Threads: 3
Joined: Jun 2019
Reputation: 0
Location: Romania
#1
2020-12-22, 04:37 PM
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.
Pinch
Offline

Burgershot Member
Posts: 391
Threads: 19
Joined: Apr 2019
Reputation: 22
Location: Belgrade, Serbia
#2
2020-12-22, 05:25 PM
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.
shane adevaratu
Offline

Burgershot Member
Posts: 9
Threads: 3
Joined: Jun 2019
Reputation: 0
Location: Romania
#3
2020-12-22, 05:37 PM
Return false.

Code:
hook OnPlayerClickTextDraw( playerid, Text:clickedid ) {
        //code
    return false; }
Pinch
Offline

Burgershot Member
Posts: 391
Threads: 19
Joined: Apr 2019
Reputation: 22
Location: Belgrade, Serbia
#4
2020-12-22, 06:23 PM (This post was last modified: 2020-12-22, 06:25 PM by Pinch.)
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.
shane adevaratu
Offline

Burgershot Member
Posts: 9
Threads: 3
Joined: Jun 2019
Reputation: 0
Location: Romania
#5
2020-12-22, 06:48 PM
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.
Pinch
Offline

Burgershot Member
Posts: 391
Threads: 19
Joined: Apr 2019
Reputation: 22
Location: Belgrade, Serbia
#6
2020-12-22, 07:47 PM
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.
shane adevaratu
Offline

Burgershot Member
Posts: 9
Threads: 3
Joined: Jun 2019
Reputation: 0
Location: Romania
#7
2020-12-22, 09:05 PM
You are a genius. I used a filterscript a few days ago and I forgot to remove it. This causes the problem.
Pinch
Offline

Burgershot Member
Posts: 391
Threads: 19
Joined: Apr 2019
Reputation: 22
Location: Belgrade, Serbia
#8
2020-12-23, 10:56 AM
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.
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode