hogscraper 10 Posted October 3, 2014 Hey guys, I searched for a while on this, and maybe I was searching the wrong thing, but I can't find a solution for using addWeaponGlobal then getting addPrimaryWeaponItem to work in an MP environment. I have a pvp setup where players can only get gear by packaging an array and publicvariableserver. The server checks out what they want then assigns the items and weapons. I don't seem to have any trouble at all except with assigning weaponitems. (ran on server) _player addWeaponGlobal _weapon; //works _player addPrimaryWeaponItem _first_weapon_item;//does not work I thought maybe it had to do with this issue: http://feedback.arma3.com/view.php?id=18446 where maybe it can't add an item to a weapon that isn't currently being held but using [[[_weapon],{_primaryWeapon=_this select 0;player selectWeapon _primaryWeapon;}],"BIS_fnc_spawn",_player,false] call BIS_fnc_MP; will select the weapon but it still won't add the weaponitems afterward. As an alternative, if I use BIS_fnc_MP along with addweapon and addprimaryweaponitem, will that kick a player if addprimaryweaponitem or addweapon is in the list to kick? I know if a client tries to run ones of those locally it will kick them, but I wasn't sure if it made allowances for BIS_fnc_MP. Or does anyone know if they have plans to add an addPrimaryWeaponItemGlobal like they did with addWeaponGlobal? Thanks for any help you can give! hogs Share this post Link to post Share on other sites
Jigsor 176 Posted October 3, 2014 Without seeing more code its possible that _first_weapon_item is not a string or _first_weapon_item is not a compatible weapon attachment for that weapon. Share this post Link to post Share on other sites
hogscraper 10 Posted October 3, 2014 using this code works [[[_weaponitem_one],{_primaryWeaponItem=_this select 0;player addPrimaryWeaponItem _primaryWeaponItem;}],"BIS_fnc_spawn",_player,false,true] call BIS_fnc_MP; using this does not _player addPrimaryWeaponItem _weaponitem_one; execution started by player and run locally player addPrimaryWeaponItem _weaponitem_one; is working fine so I know the variable is formatted correctly and the weaponitem is a correct attachment. I just can't figure out how addWeaponGlobal is even useful or relevant if you can't also attach weaponitems in the same manner. Share this post Link to post Share on other sites
Jigsor 176 Posted October 3, 2014 if execution is started by player then why use BIS_fnc_MP? Just run it player side and everyone can still see it. this is working for me: [player,"arifle_Mk20_ACO_F",10] call BIS_fnc_AddWeapon; player addprimaryweaponitem "acc_flashlight"; Share this post Link to post Share on other sites
hogscraper 10 Posted October 4, 2014 (edited) I know that I can spawn gear client side. I made the publicvariableserver request to keep the spawning from being able to happen client side and attempting to use BE filters to block players from things they shouldn't have. They've added in addweaponglobal already, so it makes no sense why I cannot add weaponitems from server to client as well. If no one knows how I can just leave the weapon spawning client side and attachments only client side I just didn't want to do that. ---------- Post added at 01:21 ---------- Previous post was at 00:08 ---------- Since I was able to test BIS_fnc_MP and found that BE filters will still kick for addprimaryweaponitem, even if code doesn't exist on client except when delivered from server I added this to Killzone Kid's bug tracker report on incorrect/missing scope of commands. If anything comes from that I will update this thread in case someone else happens along and is having this same issue. http://feedback.arma3.com/view.php?id=15298 Edited October 4, 2014 by hogscraper Share this post Link to post Share on other sites
killzone_kid 1332 Posted October 4, 2014 I know that I can spawn gear client side. I made the publicvariableserver request to keep the spawning from being able to happen client side and attempting to use BE filters to block players from things they shouldn't have. They've added in addweaponglobal already, so it makes no sense why I cannot add weaponitems from server to client as well. If no one knows how I can just leave the weapon spawning client side and attachments only client side I just didn't want to do that.---------- Post added at 01:21 ---------- Previous post was at 00:08 ---------- Since I was able to test BIS_fnc_MP and found that BE filters will still kick for addprimaryweaponitem, even if code doesn't exist on client except when delivered from server I added this to Killzone Kid's bug tracker report on incorrect/missing scope of commands. If anything comes from that I will update this thread in case someone else happens along and is having this same issue. http://feedback.arma3.com/view.php?id=15298 Made a ticket. Upvote please: http://feedback.arma3.com/view.php?id=21025 Share this post Link to post Share on other sites
hogscraper 10 Posted October 4, 2014 upvoted! Thanks for your help. Share this post Link to post Share on other sites