I don't own that script (though), anyway basically you has to increase a global var by one, each time you get a key (in your case "doorkey " var)
Place a keys in a map.
Attach the script to each one (those than increase var, usually "key.lua" with a bit modification, to suit yours needs)
Rename script IE: "multikey.lua"
Rename also the functions (_init and _main) in the script.
Where "key.lua" say:
if Result < 20.0 then
Prompt ("Press E To pick up key")
if g_KeyPressE == 1 then
if doorkey < 3 then doorkey = doorkey+1 end -- assure doorkey don't increase forever.
PromptDuration("Collected key",3000)
PlaySound(e,0)
Collected(e)
Destroy(e)
ActivateIfUsed(e)
end
end --g_KeyPressE
end --Result
And attach your script to the door, it should work.
3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz
OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics