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!

M9K Knife needs "ammo"

Discussion in 'Programming' started by Shend23, Aug 3, 2014.

  1. Shend23

    Shend23 2mlg4you

    So, I made an M9K knife really kick to test on Auspicion's server to see if it work work, he says he could see it as an item but it wouldn't let him equip it (use it) because it needed ammo. I've checked everything, it seems to be alright, but for some reasons, it needs ammo. Weird. Can anyone help me? Thanks.
     
  2. Lev

    Lev certified honorable guy

    Does it look like this in your sh_knife.lua? (Or, the item .lua)
    Code:
    local ITEM = Clockwork.item:New("melee_base");
     
  3. Shend23

    Shend23 2mlg4you

    Oh my fucking god, I love you Lev and Duspende.
    Edit: Hopefully it works
     
  4. Lev

    Lev certified honorable guy

    Yeah, the bases are pretty important, hah.
    (They're all located in root/garrysmod/gamemodes/clockwork/framework/items)
     
  5. >mfw we're not supposed to tell people to edit the framework, even though i edit my own framework 24/7

    everything can be done through a plugin

    make plugin
    do the do
    get the knife
     
  6. Lev

    Lev certified honorable guy

    I edit it 24/7.
    Though, he did make a plugin, if I recall. Besides, I mean, It's an item, also he's not distributing it.
     
  7. Shend23

    Shend23 2mlg4you

    Agh, it didn't work. The melee base isn't in framework/items where you said. I'm not sure.
     
  8. Lev

    Lev certified honorable guy

    Maybe try..
    Code:
    local ITEM = Clockwork.item:New();
    I forgot there's no melee base, sorry. If that doesn't work, you might as well just send us a
    Code:
     of your work.
     
  9. Owl

    Owl smoke weed

    [member=5494]Shend23[/member]

    Code:
    local ITEM = Clockwork.item:New("weapon_base");
    Then, just before ITEM.description put:

    Code:
    ITEM.isMeleeWeapon = true;
     
  10. Now that this topic is solved, reminds me sort of that DayZ glitch where if you reloaded your axe you couldn't use it anymore.
     

Previous Readers (Total: 0)