--set this to the name of the weapon your player will use as the flashlight --note that any \ must be doubled i.e. "modern\\colt1911" local weapon_name = "modern\\colt1911" --if you're unsure what that would be then set show_weapon_names = 1 and equip the desired weapon local show_weapon_names = 1 --should the flashlight be on when equipped? local turnOnWhenEquipped = 1 local held_weapon = "" function flashlight_equipped_init(e) end function flashlight_equipped_main(e) if show_weapon_names == 1 then Prompt(g_PlayerGunName) end --only trigger the check when player changes weapon if g_PlayerGunName ~= held_weapon then --holding the flashlight if g_PlayerGunName == weapon_name then SetFlashLightKeyEnabled(1) --check if flashlight should start on or not when player holds it (otherwise he can toggle it as normal with F) if turnOnWhenEquipped == 1 then SetFlashLight(1) else SetFlashLight(0) end else --not holding the flashlight SetFlashLightKeyEnabled(0) SetFlashLight(0) end --set the current weapon so we don't repeat the check til weapon is changed held_weapon = g_PlayerGunName end end