-- LUA Script - precede every function and global member with lowercase name of script + '_main' -- Switch to open door function doorswitchcombireset_init(e) Door_SwitchcombiReset = 0 SwitchActivatedCombiReset = 0 end function doorswitchcombireset_main(e) PlayerDist = GetPlayerDistance(e) if PlayerDist < 100 and g_PlayerHealth > 0 then if SwitchActivatedCombiReset == 0 then Prompt("Press E key to activate switch") if g_KeyPressE == 1 then Door_SwitchCombiReset = 1 PromptDuration("resetswitch activated" ,3000) SwitchActivatedCombiReset = 1 SwitchActivatedCombi1 = 0 SwitchActivatedCombi2 = 0 SwitchActivatedCombi3 = 0 end end end end