1. Post #1
    Mangmasta's Avatar
    December 2009
    195 Posts
    Hi, I'm making my first game mode and I have run into some problems.

    How do I attach something through lua? (like the same way it would be if you go into the model browser and go to file -> load weapon)

  2. Post #2
    zzaacckk's Avatar
    June 2009
    2,153 Posts
    I'm not clearly understanding what you are saying... Put it in the addons folder?

  3. Post #3
    SchumacherAlt's Avatar
    May 2010
    501 Posts
    I don't quite understand what you're doing, do you mean

    include( " dir " );
    

    or
    AddCSLuaFile( " dir " );
    

    What are you trying to do? Explain this more.

  4. Post #4
    Gold Member
    butters757's Avatar
    December 2008
    3,596 Posts
    I believe he's talking about attaching a model to a bone.

  5. Post #5
    SchumacherAlt's Avatar
    May 2010
    501 Posts
    I believe he's talking about attaching a model to a bone.
    Oh that'd make sense,

    Then what is

    (like the same way it would be if you go into the model browser and go to file -> load weapon)
    suppose to mean.

  6. Post #6
    Mangmasta's Avatar
    December 2009
    195 Posts
    Yeah, im sorry if I did not word it correctly. I meant to ask how you would achive the same thing, through lua, the thing that would happen if you went into the model browser, in source sdk, load a model, then go to file -> load weapon, so It would attach to their hand.

  7. Post #7
    Mangmasta's Avatar
    December 2009
    195 Posts
    Aww come on! is the problem really that hard? I really need some help please! *BUMP*

  8. Post #8
    StealthPaw
    101kl's Avatar
    March 2008
    492 Posts
    Not hard, but believe it or not the people on this forum also have lives.
    This this what you mean? Player.Give

  9. Post #9
    Busymonkey's Avatar
    July 2009
    1,974 Posts
    Is that what you meant!? Giving the player a weapon!? :effort:

    Yea, use Player.Give.

  10. Post #10
    Gold Member
    HeavyMtl123's Avatar
    December 2007
    1,803 Posts
    Is that what you meant!? Giving the player a weapon!? :effort:

    Yea, use Player.Give.
    Dear god, if that what he actually meant, than god help this kid when he tries to code full-scale.

  11. Post #11
    Mangmasta's Avatar
    December 2009
    195 Posts
    No, no, that's not what I ment. I mean to ask: how do you simulate the action done by the model viewer when you load a weapon.

    Here, I'll tell you what I'm working on. I am trying to make l4d2 SWEPs and I had problems figuring out how the view models work. In model viewer, if you load the weapon view model, the hands are not there. I figured out how to get the hands attached by going to file->load weapon, then choose the hands model. My question is: how would I "load the weapon" (the hands model) on to the gun through Lua?

  12. Post #12
    Busymonkey's Avatar
    July 2009
    1,974 Posts
    Okay, so you want your hands to be on the weapon?

    Edited:

    You are really bad at explaining stuff.

    Edited:

    and why is the thread called Gamemode question, when you're asking for help with SWeps? :effort:

  13. Post #13
    Mangmasta's Avatar
    December 2009
    195 Posts
    Sorry, I'm making SWEPs for a gamemode. You're right, I should have named it differently. In fact, I'll rename it now.

    Yes, the bottom line is that I want the hands on the gun.

    My friend told me a way to do it by recompiling, but I don't want to do that for 2 reasons:

    1) I don't want the client to download custom models and stuff. It should all be accessed through gm_mount

    2) MDLDecompiler doesn't work on my computer (tier0.lib is not found).

    Edited:
    Nah, Im not going to change the title.

  14. Post #14
    SHADERS
    Legend286's Avatar
    October 2008
    10,024 Posts
    Basically, he wants the separate v_hands mdl file to attach onto the view where the weapon model he's using is. Like in TF2 with the C_ models which are just the weapon with no hands that gets attached into the first person view and syncs with the animations.
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Late Late x 1 (list)

  15. Post #15
    Busymonkey's Avatar
    July 2009
    1,974 Posts
    As both me and him just said, yes.

  16. Post #16
    diaoyudao shi ZHONGGUO de
    Disseminate's Avatar
    December 2007
    4,094 Posts
    What he wants to do is to attach a prop to the hand bone.

  17. Post #17
    SHADERS
    Legend286's Avatar
    October 2008
    10,024 Posts
    It's not a prop, it's another viewmodel which contains the hands. The two viewmodels combine and play the same animation to make it seem like the weapon is in the hand. It's just some retarded way valve are using for their new games.

  18. Post #18
    c-unit's Avatar
    March 2010
    1,685 Posts
    I think he is talking about when you click on AK-47 a model of the AK comes up?
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 1 (list)

  19. Post #19
    Mangmasta's Avatar
    December 2009
    195 Posts
    I think he is talking about when you click on AK-47 a model of the AK comes up?
    No....

    Basically, he wants the separate v_hands mdl file to attach onto the view where the weapon model he's using is. Like in TF2 with the C_ models which are just the weapon with no hands that gets attached into the first person view and syncs with the animations.
    YES!

  20. Post #20
    c-unit's Avatar
    March 2010
    1,685 Posts
    oh XD

  21. Post #21
    Busymonkey's Avatar
    July 2009
    1,974 Posts
    I think he is talking about when you click on AK-47 a model of the AK comes up?
    :milk:

    Edited:

    Anyways, modeling is outta my league, sorry.

  22. Post #22
    c-unit's Avatar
    March 2010
    1,685 Posts
    :milk:

    Edited:

    Anyways, modeling is outta my league, sorry.
    :wtc: