AccessTrackRules

Discussion in 'Plugins' started by DanRZ, Jun 29, 2023.

  1. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    724
    Likes Received:
    222
    Hello,i'm trying to modify a plugin.
    I tried to do something on AccessTrackRules call but it seems to never be called o_O

    I overloaded what is needed :
    Code:
    bool WantsTrackRulesAccess() { return( true ); }
    bool AccessTrackRules(TrackRulesV01& info);
    I used a throwyellow to activate it, but still nothing ...

    Any help ? It seems to work on StockCarRulesPlugin.
    I probably missed something ...
     
  2. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,389
    Likes Received:
    6,602
    Did you change the return value from GetPluginVersion() to at least 7?
     
    DanRZ likes this.
  3. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    724
    Likes Received:
    222
    Hello. Funny, at some point i tried it and the server never started ...
    Are there anything else to do ? Maybe i'm not using the good internalplugin.hpp. I use the version 4.
    StockCarRules plugin uses version 7 and the header of the internalplugin.hpp is identical of mine.
    I use the one in the example plugin, if i remember well.
    I will retry ... Maybe i didn't update the very last example plugin in my plugin.
     
  4. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,389
    Likes Received:
    6,602
    Yeah, I would say start with a recent example that has up to version 7. The fact setting that in the .cpp froze it suggests something in the header was broken, so just do a clean start and copy any of your stuff over.

    I haven't run a plugin for rules stuff for years, but assuming the one I have would still work the code doesn't do anything special, just built on the v7 example and returned 7 for the plugin version...
     
  5. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    724
    Likes Received:
    222
    I forgot to derive from the good version, and not V04 :

    Code:
    class MyPlugin : public InternalsPluginV07
    And now it works ;)
     
    Lazza likes this.

Share This Page