papahyooie

How to add weapon attachments

6 posts in this topic

Does anyone know how to add weapon attachments? 

Ive tried adding them in the config.cpp

I've also tried adding them into exile_server\code\ExileServer_object_player_network_createPlayerRequest.sqf      using  addPrimaryWeaponItem

I don't want any custom scripts for respect based loadouts or any of that. Just want a weapon attachment in my bambi spawn. 

I'd even be ok if it spawned in the inventory and they had to put it on themselves. 

Share this post


Link to post
Share on other sites

Does addItem not work? Make sure you're adding them AFTER the vest/backpack has been added or there may not be space for the attachment.

1 person likes this

Share this post


Link to post
Share on other sites
Advertisement
2 hours ago, kuplion said:

Does addItem not work? Make sure you're adding them AFTER the vest/backpack has been added or there may not be space for the attachment.

BAH!.... you're exactly right... I was actually trying to add the attachment before the stupid weapon... I'll try that, and I'm 100% sure it will work. Thank you for spotting my dumb mistake. 

2 hours ago, second_coming said:

http://pastebin.com/0ANjStq8

Just tested, and it works fine.

Yup. I bet it does work lol

Share this post


Link to post
Share on other sites

Posted (edited)

9 minutes ago, papahyooie said:

BAH!.... you're exactly right... I was actually trying to add the attachment before the stupid weapon... I'll try that, and I'm 100% sure it will work. Thank you for spotting my dumb mistake. 

Yup. I bet it does work lol

If you want the attachment to be added to a weapon instead of just in the inventory (if addPrimaryWeaponItem isn't working), I believe assignItem will work.

_bambiPlayer assignItem "AMS_Scope";

I use these to place tools in the correct slots in my custom loadout script for Admin and VIP.

Edited by kuplion

Share this post


Link to post
Share on other sites
12 hours ago, kuplion said:

If you want the attachment to be added to a weapon instead of just in the inventory (if addPrimaryWeaponItem isn't working), I believe assignItem will work.


_bambiPlayer assignItem "AMS_Scope";

I use these to place tools in the correct slots in my custom loadout script for Admin and VIP.

addPrimaryWeaponItem works fine to attach it to the weapon. Thanks though! 

1 person likes this

Share this post


Link to post
Share on other sites
Advertisement

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.