stefutz101 Posted December 31, 2015 Share Posted December 31, 2015 Hi again , i have a question . I added a new weapon in Dayz game mode , and i want to know how i can put 2 skins on the same gun . So if gun have the name "M4" = skin x "M4 Test " = skin y . Or i can use another id for guns ? Photo : http://postimg.org/image/r0ltm9uc1/ Thanks in advance ! Link to comment
Captain Cody Posted January 1, 2016 Share Posted January 1, 2016 Similar question asked a bit ago, only thing I can think of is it load a different txd / dff file if a person is in range of the gun. But that would replace all guns in range, other then that I'm not sure unless you were to attach a custom model to the persons hand when the gun is out and replacing the original gun with an invisible model, finding the object of the gun that the person is holding is near impossible, from what I know. Link to comment
Tekken Posted January 1, 2016 Share Posted January 1, 2016 All you can do here is attaching some interior models (ex: a TV) to M4 and make M4 alpha 0 and then replace M4 skin with that custom model you made earlier and voila. Edit: Also give some advice here. Link to comment
Saml1er Posted January 1, 2016 Share Posted January 1, 2016 This can be achieved using engineApplyShaderToWorldTexture You can check the "UV scripted" resource to see how its done. Link to comment
Tekken Posted January 1, 2016 Share Posted January 1, 2016 This can be achieved using engineApplyShaderToWorldTexture You can check the "UV scripted" resource to see how its done. This will only work client side he also need server side and my idea fits perfectly. I am also using it. Link to comment
stefutz101 Posted January 1, 2016 Author Share Posted January 1, 2016 I do not understand. So i must change m4 id with an interior id like ... tv , pc , clothings etc ? And put a m4 skin on it ? Example please ? ... Or try to explain it step by step ... Link to comment
Tekken Posted January 1, 2016 Share Posted January 1, 2016 I do not understand.So i must change m4 id with an interior id like ... tv , pc , clothings etc ? And put a m4 skin on it ? Example please ? ... Or try to explain it step by step ... Yes that's what you must do. Already give'd a example here. Link to comment
stefutz101 Posted January 1, 2016 Author Share Posted January 1, 2016 So you want to say if i put a m4 skin on TV (or another object ) i can fire with that TV ? ... In inventory.lua i have this : .... ["M4 Test Mag"] = { {"M4 Test",31}, }, ... I looked : https://wiki.sa-mp.com/wiki/Weapons and that 31 is m4 id , so i must change that id with another one and put m4 skin on that id ? :D Link to comment
stefutz101 Posted January 1, 2016 Author Share Posted January 1, 2016 If i replace m4 id ( 31 ) to another one i have errors in debugscript when i'm trying to equip weapon . (bad arg "giveweapon"[expected weapon-type at argument 2, got number "1208"). So yah i want to change m4 id ( 31 ) in 1208 ( a washing machine ) . Ok . So for replace model i know how : --m4 txd = engineLoadTXD ( "weapons/m4.txd" ) engineImportTXD ( txd, 1208 ) dff = engineLoadDFF ( "weapons/m4.dff", 1208 ) engineReplaceModel ( dff, 1208 ) But i dont know where i must change the m4 id ... . Pickups.lua M4 Test",356,1,90,2.4}, Here ? Link to comment
Addlibs Posted January 1, 2016 Share Posted January 1, 2016 Weapon-type is different from weapon-model. You need to use a resource like bone_attach to use custom weapon model ID Link to comment
stefutz101 Posted January 2, 2016 Author Share Posted January 2, 2016 I'm using bone_attach . How this resource can help me with my problem ? Link to comment
Tekken Posted January 2, 2016 Share Posted January 2, 2016 I'm using bone_attach . How this resource can help me with my problem ? This doesn't have anything to weapons. Link to comment
stefutz101 Posted January 2, 2016 Author Share Posted January 2, 2016 Mihayy read up , i explain some things ... Link to comment
Tekken Posted January 2, 2016 Share Posted January 2, 2016 Mihayy read up , i explain some things ... Well 31 is the Weapon ID not Texture ID you need Texture ID witch is this: Link to comment
stefutz101 Posted January 2, 2016 Author Share Posted January 2, 2016 So i must replace that 356(all from all gamemode) with another id and put skin on that id ? Link to comment
Tekken Posted January 2, 2016 Share Posted January 2, 2016 So i must replace that 356(all from all gamemode) with another id and put skin on that id ? yup but is a bit more complicated Link to comment
stefutz101 Posted January 2, 2016 Author Share Posted January 2, 2016 I do it . But my new guns still don't have skins if i have weapon in hands , if i drop weapon it have skin ... . Link to comment
stefutz101 Posted January 2, 2016 Author Share Posted January 2, 2016 Ok after 2 hours i do it . But i have a problem . Infinite bullets ... Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now