This script is called from another script in which the player is setpos in the sameplace as the selected squad member, then the squadmemeber is deletevehicle outta there.It is so the player can take the role of another squad member during the mission.
I get a error messege:
No entry 'config.bin/Cfg weapons.scalar bool array string oxfcffffer'
Then the system gets all laggy.
I'm using non addon weapons. My scripting is basic, so I could be barking up the wrong tree.
note: _this is the squad memeber being replaced by the player
;;;;;;;;;;;;;;;;;;
;FLBEE
;finds a units weapon loadout and gives it to player
_member = _this
_pimary = PrimaryWeapon _memeber
_secondary = SecondaryWeapon _member
_magarray = magazines _memeber
_magnumber = count _magarray
_num = 0
#loop
_mag = _magarray select _num
player addmagazine format ["%1",_mag]
_num = _num + 1
?_num > _magnumber : goto "next"
goto "loop"
#next
player addweapon format ["%1",_primary]
player addweapon format ["%1",_secondary]
exit