-- LUA Script - precede every function and global member with lowercase name of script + '_main' -- Player Collects Weapon require "corno_beginner_plugin" function weaponcorno_init(e,name) weapon_name[e] = name end function weaponcorno_main(e) PlayerDist = GetPlayerDistance(e) PlayerFacing = giveback if PlayerDist < 150 then Prompt("State 1") if PlayerFacing < 20.0 then Prompt ("Press E To pick up the " .. weapon_name[e]) if g_KeyPressE == 1 then PromptDuration("Collected the " .. weapon_name[e],3000) PlaySound(e,0) AddPlayerWeapon(e) Destroy(e) ActivateIfUsed(e) end end end end