no you would do it by editing the script so it's stored at the time of pick up - the name is already stored for weapons but as you say, it's not for storing that it's collected or anything but merely used to show the name when the player is looking at it.
it would only require 2 lines to do (plus 2 declarations) ;
1 to store a counter (so we can adjust the array)
and 1 to store the actual name
so it'll end up looking something like this
if g_KeyPressE == 1 then
guns = guns + 1 --array counter
gun_name[guns] = weapon_name[e] --store the name at this slot
AddPlayerWeapon(e)
end
then store the values into a text file when the level finished (dont remember the code off the top of my head but it's in the lua manual)
then when the new level is loaded you would loop through a predetermined number of weapons (based on however many were in the previous level but any number that's greater will be fine too) and check the gun_name and give the corresponding weapon
repeat
a = a + 1
if gun_name[a] ~= nil then
if gun_name[a] == "colt" then
AddPlayerWeapon(#) --set to entity number of the colt in the new map
elseif weapon_name[a] == "shotgun" then
AddPlayerWeapon(#) --set to entity number of the shotgun in the new map
--etc
until a == 9
the only slot we have access to is the players current weapon (which means if a gun is collected but never held then it wont be stored)
life\'s one big game
windows vista ultimate
i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11