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 /radio ?

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

  1. blt950

    blt950 HL2RP fan and Lua Scripter

    Hey guys, I wonder if there is a possibility to override an existing command?

    I want to edit the /radio command, as I add it some new functionalities and statements to make it work, though making the command and just placing it in the schema directory does not seem to override the default radio command that is in the Clockwork directory.

    The main purpose of schema is that you can customize it to your needs without editing the framework, though the only solution for this issue I found just to delete the radio command in Clockwork.
    Any ideas how to do this?
     
  2. NightAngel

    NightAngel Fuck off Lev

    This is the part where you go to the timeout corner for editing the schema. Anyways, you want to use
    Code:
    local COMMAND = Clockwork.command:FindByID("radio")
    Edit: Also, make it a plugin, like my radio plugin.
     
  3. Vortix

    Vortix Moderator Staff Member Moderator Legend Clockwork Customer

    I'd hope it doesn't count when you're editing your own schema! :eek:
    (Black Mesa RP)
    At least, I'd automatically assume that's what he's editing, considering it's back up and running again.
     
  4. NightAngel

    NightAngel Fuck off Lev

    o. Stilllll.. It's a good habit to haaave.. :p
     
  5. Vortix

    Vortix Moderator Staff Member Moderator Legend Clockwork Customer

    Can't argue that :p
     
  6. Polis

    Polis Guest

    As NightAngel pointed out, you would have to hook into the file and make adjustments as you see fit. You're very good at lua and clockwork from what I've seen, so you'll probably now that any adjustments you make by hooking into the file will completely override a function as it is.
     
  7. Vortix

    Vortix Moderator Staff Member Moderator Legend Clockwork Customer

    That's not only why, this is a reason, from the rules:
    12. When giving support for Clockwork, never advise any framework changes.
    -> Everything is possible through a plugin.
     
  8. duck

    duck Phant0m Legend

    It's not that you're not allowed, it's that if you edit the gamemode, support can't be provided. If you modify your product, and then the product ends up not working, the company has no obligation to provide support. We can guarantee Clockwork will work if you install it and then not change. We CANNOT guarantee Clockwork will work if you go around editing Lua code and you don't even know Lua.
     
  9. duck

    duck Phant0m Legend

    That's not the point. The point is that we cannot guarantee the gamemode will work and we aren't going to jump through hoops just because you decided to modify your framework or schema and you don't know Lua.

    Modify your framework or schema if you want, just don't expect support from C16.
     
  10. blt950

    blt950 HL2RP fan and Lua Scripter

    Tried this, getting this error if it's in schema and plugin. Though Clockwork.command:FindByID("Radio") works after the server has started.
    Code:
    [ERROR] gamemodes/cwblackmesa/schema/commands/sh_radio.lua:13: attempt to index local 'COMMAND' (a nil value)
      1. unknown - gamemodes/cwblackmesa/schema/commands/sh_radio.lua:13
       2. include - [C]:-1
        3. IncludePrefixed - gamemodes/clockwork/framework/sh_kernel.lua:3634
         4. IncludeExtras - gamemodes/clockwork/framework/libraries/sh_plugin.lua:580
          5. Register - gamemodes/clockwork/framework/libraries/sh_plugin.lua:221
           6. Register - gamemodes/clockwork/framework/libraries/sh_plugin.lua:377
            7. unknown - gamemodes/clockwork/framework/libraries/sh_plugin.lua:290
             8. IncludeSchema - [C]:-1
              9. unknown - gamemodes/clockwork/framework/sh_boot.lua:99
               10. include - [C]:-1
                11. unknown - gamemodes/clockwork/framework/sv_kernel.lua:10
                 12. include - [C]:-1
                  13. unknown - gamemodes/clockwork/gamemode/init.lua:23
                   14. DeriveGamemode - [C]:-1
                    15. unknown - gamemodes/cwblackmesa/gamemode/init.lua:6
    
     

Previous Readers (Total: 0)