1. This forum is ARCHIVED! Visit the new Cloud Sixteen forums, codename Eden, at https://eden.cloudsixteen.com. These forums will remain archived for a few months before being closed down, so try to encourage plugin developers to begin moving their content across to the new forums.
Dismiss Notice
Hi Guest, you need a Steam account to register and post on these forums. Login with Steam at the top of the forums to get started!
Dismiss Notice
Hi Guest, do you want to buy HL2RP or another Clockwork schema? Visit the Cloud Sixteen Store to get started!

Override sv_hooks.

Discussion in 'Development' started by Vortix, Jul 29, 2014.

  1. Vortix

    Vortix Moderator Staff Member Moderator Legend Clockwork Customer

    I'm using:
    function PLUGIN:
    In a plugin I've made to change models, however it got overridden by the Schema: function which sets models for EpU, OfC, DvL and SeC combine ranks. I was hoping someone would be able to tell me got to stop it from doing so without editing the schema. I've thought that changing "function PLUGIN:" to "function Schema:" might work, however I have also been told that when making a plugin this is not advised.
     
  2. Polis

    Polis Guest

    You will most likely have to use 'Schema:' in this case, as you wish to completely override a function.

    This is fine. I do it in some of my plugins, and so do most developers here.
     
  3. Vortix

    Vortix Moderator Staff Member Moderator Legend Clockwork Customer

    Ah, right, well thanks.
    If I were doing such and overriding the function would I need to include sections of it which are not related to my plugin?
    For example if I were using PostPlayerSpawn as part of the plugin to set models, would I also have to replace the
    player:SetMaxHealth(150); part of it as I would be completely overriding the function, despite the fact that is it useless to my plugin?
     
  4. Polis

    Polis Guest

    Yes. You would have to copy and paste the function as it is and make adjustnentms.
     
  5. Vortix

    Vortix Moderator Staff Member Moderator Legend Clockwork Customer

    Alright, thanks.
     
  6. duck

    duck Phant0m Legend

    Return a value after you have changed the player's model and the schema (including other plugins) will not override it.

    Use PLUGIN, not Schema.
     

Previous Readers (Total: 0)