Jump to content

More weapons


Dzsozi (h03)

Recommended Posts

Posted

Hello! I was thinking about how I could make more weapon types or weapons, dayz gamemode could do that, and valhalla gamemode also has these taser guns, but (if I'm not mistaken) they kept the default weapons as well. The taser just had a different look and functionalities done via scripting, but it was a weapon. How I could do similar things, so I could make for example a grenade launcher with custom projectiles, but also keep the rocket launchers or any other weapon and the ability to use them normally. How can dayz have m1911, m9, m9 sd and so much more pistols and other kind of weapons with different sounds, different damage and etc etc?

  • 2 weeks later...
Posted

I looked up the DayZ open source files and I found that it is made using setElementData to players, but I can't find how is it being handled, where is it set. I just found the part where the weapons are being replaced and I would like to try doing it that way. Could somebody help me where I can find the handling of this element data? Which lua file?

I found these:

https://github.com/mtadayz/MTADayZ/blob/master/DayZ/tables/table_general.lua

https://github.com/mtadayz/MTADayZ/blob/master/DayZ/models/weaponswitch.lua

Posted

I just remembered how somebody I know did this. He replaced the textures of the guns with an "invisible" texture so you can't see them all. Then whenever a player has a gun in their hands, create an object and attach it to their hand.

Posted

But I would like to do it in a way like the DayZ gamemode has it, since it is just replacing the models and handles the functions, there is no need to create objects, play around with positions. I am also afraid of objects because I think they wouldn't be steady if I move my camera so fast.

  • Like 1
Posted

Just to let you know, I'm pretty sure that in that DayZ gamemode, only the local client sees different weapons. When you replace the TXD, whatever you do, you either change it for every client (so you can have only 1 weapon) or only 1 client and others won't see it. Why do you think you need shaders to replace car paintjobs, CJ skin color, head type etc?

Posted

I understand that I can replace textures with different ones at the same time more than once, and I cannot do that with models, but I would like to just give it a try and try out the custom added weapons from the dayz mod now. If it doesn't work how I want it to work, then I will try to do it like you said, but I'm just interested about the DayZ method, so I can learn and try it.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...