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!

HL2RP Need a bit of help on a plugin I'm *trying* to make.

Discussion in 'Development' started by Maroon, Dec 16, 2017.

  1. Maroon

    Maroon Clockwork Customer

    So I'm trying to make a plugin for Zombine Voice commands, but no matter what I do it just won't work. There's probably something incredibly stupid I'm missing, so any help could be used. Here's my code, any help could be appreciated.
    I'm new to the whole lua aspect, so there's most likely something simple missing.
    https://pastebin.com/WH3gaHNt

    Thanks in advance!


    edito: for anyone wondering, i'm a dev for a server so that's why im trying to make plugins without being a 'customer' in a way.
     
  2. Mixed

    Mixed removed Clockwork Customer

    Code:
    Schema.voices:Add("Zombine", "ZChatter1", "Para... site...", "npc/zombine/zombine_idle1.wav");
    
    In your librarie you call PLUGIN, but here you call Schema.
     
  3. Maroon

    Maroon Clockwork Customer

    Oh! I think I see what you mean now. So What i'm doing wrong is im putting Schema instead of Plugin? Hm.
     
  4. Aspect

    Aspect =) Legend Clockwork Customer

    Did you get this to work, @Maroon?
     
  5. vexus

    vexus ej rockwell's worst nightmare Staff Member Manager Legend Clockwork Customer

    don't call Schema in plugins ever, you run the risk of override core hooks that might fuck CW over. as long as you declare PLUGIN = PLUGIN, anywhere you see Schema you can replace with PLUGIN.
     
    • Disagree Disagree x 2
  6. duck

    duck Phant0m Legend

    Putting it at the top doesn't always mean Schema can be replaced with PLUGIN. In this case, this whole file is wrong, Schema should be used, and the code belongs in sh_plugin
    Code:
    Schema.voices:Add("Zombine", "ZChatter1", "Para... site...", "npc/zombine/zombine_idle1.wav");
    Schema.voices:Add("Zombine", "ZChatter2", "Biotics... overrun.", "npc/zombine/zombine_idle2.wav");
    Schema.voices:Add("Zombine", "ZChatter3", "Biotics... in the perimeter...", "npc/zombine/zombine_idle3.wav");
    Schema.voices:Add("Zombine", "ZChatter4", "Sector... is not... secure...", "npc/zombine/zombine_idle4.wav");
    Schema.voices:Add("Zombine", "ZAlert1", "Biotics... overrun.", "npc/zombine/zombine_alert1.wav");
    Schema.voices:Add("Zombine", "ZAlert2", "Infes... tation...", "npc/zombine/zombine_alert2.wav");
    Schema.voices:Add("Zombine", "ZAlert3", "Contaact...", "npc/zombine/zombine_alert5.wav");
    Schema.voices:Add("Zombine", "ZPain", "Gggrgh...", "npc/zombine/zombine_pain4.wav");[/lua]
     
  7. vexus

    vexus ej rockwell's worst nightmare Staff Member Manager Legend Clockwork Customer

    i was going to tag you because i knew i was going to be wrong and i wanted to see how long it took you to correct it.

    i also like how Xeno changed his rating after you disagreed it.
     
    • Like Like x 1
    • Funny Funny x 1
  8. _HappyGoLucky

    _HappyGoLucky Clockwork Customer

    psure you can make a library file but at the top instead of newlibrary use Clockwork.kernel:FindLibrary("Voices")
    try this https://pastebin.com/KF6wyczA (edited because i was inconsistent at one point)
    put it in zombinevoicesorweitis/plugin/libraries and name it sh_voices ( gotta be neat and organized :) )

    edit
    come down to it i think this should be fine at the top in replacement
    Code:
    if !Clockwork.kernel:FindLibrary("Voices") then
        Schema.voices = Clockwork.kernel:NewLibrary("Voices")
    else
        Schema.voices = Clockwork.kernel:FindLibrary("Voices")
    end
     
    • Disagree Disagree x 1
    Last edited: Dec 25, 2017

Previous Readers (Total: 0)