mta-add-models icon indicating copy to clipboard operation
mta-add-models copied to clipboard

How to add Weapons (method)

Open 0f1 opened this issue 2 years ago • 2 comments

i wanted to know if it's possible to add weapons ? tried to add it as a object but it needs a collision file.

0f1 avatar Jan 15 '23 12:01 0f1

i wanted to know if it's possible to add weapons ? tried to add it as a object but it needs a collision file.

you can add objects without collision by doing ignoreCOL = true in the adding function

And to answer your question, yes you can add weapons but it's tricky, you need to make a script to support it. You can indeed achieve it by adding objects and attaching them to the player (with pAttach for example) and hiding the default weapon (with shader set weapon texture alpha 0, for example). Be careful when setting parent model ID for the object you add, make it something like 1337 or 1942 (I believe).

I haven't done this in a long time, so I don't know exactly how to make the script, but from what I remember the information above should help you ^^

@0f1

Fernando-A-Rocha avatar Jan 15 '23 16:01 Fernando-A-Rocha

Thanks you for the information i will go test it out right now.

0f1 avatar Jan 15 '23 17:01 0f1