try this:
function ammo_main(e)
PlayerDist = GetPlayerDistance(e)
if PlayerDist < 60 then
Prompt ("Press E to pick up the " .. weapon_name[e] .. "" )
-- end
if g_KeyPressE == 1 and g_InKey == "" then
PromptDuration("Collected ammo",3000)
PlaySound(e,0)
AddPlayerAmmo(e)
Destroy(e)
ActivateIfUsed(e)
end
end
end
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT