1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. GTA Network forum is now in archive mode.

Remove event "listener"

Discussion in 'Scripting Help' started by Bonus, May 8, 2017.

  1. Bonus

    Bonus Member

    Messages:
    13
    Likes Received:
    0
    Joined:
    May 3, 2017
    Hey,
    could someone explain to me how to remove these event "listeners"?

    Code:
    API.onUpdate.connect ( afunc );
    API.onClientEventTrigger += afunc;
    How can I remove these again?
     
  2. TheSup

    TheSup Active Member

    Messages:
    79
    Likes Received:
    10
    Joined:
    Apr 18, 2017
    Just delete it?
     
  3. Bonus

    Bonus Member

    Messages:
    13
    Likes Received:
    0
    Joined:
    May 3, 2017
    "how to remove these event "listeners""
     
  4. pa3ck

    pa3ck New Member

    Messages:
    2
    Likes Received:
    1
    Joined:
    May 10, 2017
    Did you try: API.onClientEventTrigger -= afunc;
     
  5. Bonus

    Bonus Member

    Messages:
    13
    Likes Received:
    0
    Joined:
    May 3, 2017
    Oh cool if it's that easy.
    But clientsided?
     
  6. Bonus

    Bonus Member

    Messages:
    13
    Likes Received:
    0
    Joined:
    May 3, 2017
    bump
    I can't see any way to remove the client-event-listener ...
     
  7. NMDanny

    NMDanny New Member

    Messages:
    4
    Likes Received:
    0
    Joined:
    Mar 10, 2017
    IIRC clientside API has a disconnect method for events.
     

Share This Page