[ Need Help ] Can not equip custom weapons
Closed this issue · 6 comments
code like:
"litems":{
"weapons": {
"xxx_AK47": {
"name": "xxx_AK47",
"uniqueid": "weapons/.../xxx.vmdl",
"type": "weapon",
"price": "0",
"no_pistol_round": "false",
"enable": "true"
}
}
}
Is not working, cannot change the weapon to the custom model. Is this a bug or im doing something wrong?
code like:
"litems":{ "weapons": { "xxx_AK47": { "name": "xxx_AK47", "uniqueid": "weapons/.../xxx.vmdl", "type": "weapon", "price": "0", "no_pistol_round": "false", "enable": "true" } } }
Is not working, cannot change the weapon to the custom model. Is this a bug or im doing something wrong?
Any error logs?
I found that the "type" should be "customweapon", so that the plugin can load the models(on server console), but it caused a new problem whitch is the playerskins didnt work.
the detiles:
1.when equip player skin, it shows equipped but not really work (with no info in server console)
2.when equip customweapon, it shows nothing, and the server console shows "the given key 'weapon' was not present in the dictionary."
oh and i also find that when opening the server , it will shows "failed loading resource “weapons/..../..... (ERROR_FILEOPEN: File not found)”" but i have already uploaded the weapons file to my workshop and added it in the multiaddonmanager cfg (so as the playerskins models), does the customweapon use a different way to make it loaded?
Can you show me the right way to add custom weapon? And make it can be used with playerskins (really need it plz).
Here is my cfg, I added 'weapon' into the store.json and it finally worked(with some bugs), but it still cant use with player models.
The code:
"weapons": { "deagle_hinata": { "name": "若叶日向专武(Deagle)", "uniqueid": "weapons/7ychu5/models/pist_deagle/deagle_hinata/deagle_hinata.vmdl", "weapon": "deagle", "type": "customweapon", "price": "0", "enable": "true" } },
So the BUG is that when I switched the 'deagle' to another weapon and switched it back, the custom model just disappeared, and the skin of the weapon disappered too.
And I cannot use it with playerskins (the playerskins function is good without useing custom weapons).
The playerskins config code:
"playerskins": { "HuTao":{ "name": "原神胡桃", "uniqueid": "characters/models/rho/hutao/hutao.vmdl", "armModel": "characters/models/rho/hutao/hutao_arms.vmdl", "type": "playerskin", "price": "0", "slot": "2", "disable_leg": "false", "expiration": "0", "enable": "true" } },
Custom weapon item is not stable right now, need rework. I will try to do it when i am free